;### Changed
Some checks failed
Deploy quoter Microservice on push / deploy (push) Failing after 39m16s
Some checks failed
Deploy quoter Microservice on push / deploy (push) Failing after 39m16s
- 🔑 **JWT_SECRET → JWT_SECRET_KEY**: Используется `JWT_SECRET_KEY` для совместимости с `@core`, `@inbox`, `@presence` - Fallback на `JWT_SECRET` для обратной совместимости - Обновлена документация: README.md, configuration.md - **BREAKING**: Требует установки `JWT_SECRET_KEY` в production (или использование legacy `JWT_SECRET`) ### Fixed (Tests & Code Quality) - 🧪 **Удален мертвый код**: Removed unused mock functions and structs from tests - 🔧 **Исправлены async тесты**: Changed `#[test]` → `#[tokio::test]` для async функций - 🧹 **Чистые warnings**: Все тесты компилируются без warnings - 📝 **Префиксы unused полей**: `_field` вместо `#[allow(dead_code)]`
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use quoter::{AppState, RedisConnectionPool, authenticate_request_with_pool};
|
||||
use quoter::RedisConnectionPool;
|
||||
use std::time::Duration;
|
||||
use tokio::time::sleep;
|
||||
|
||||
@@ -137,7 +137,7 @@ async fn test_app_state_redis_pool_methods() {
|
||||
// В реальном окружении нужен валидный Redis
|
||||
|
||||
// Создаем AppState без Redis (для тестирования fallback)
|
||||
use quoter::security::SecurityConfig;
|
||||
// use quoter::security::SecurityConfig;
|
||||
|
||||
// Этот тест проверяет, что методы существуют и компилируются
|
||||
// В реальном тесте с Redis:
|
||||
@@ -152,10 +152,10 @@ async fn test_app_state_redis_pool_methods() {
|
||||
#[tokio::test]
|
||||
async fn test_authenticate_request_with_pool() {
|
||||
use actix_web::test;
|
||||
use quoter::security::SecurityConfig;
|
||||
// use quoter::security::SecurityConfig;
|
||||
|
||||
// Создаем тестовый запрос
|
||||
let req = test::TestRequest::default()
|
||||
let _req = test::TestRequest::default()
|
||||
.insert_header(("authorization", "Bearer invalid-token"))
|
||||
.to_http_request();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user