feat: 주요 CLI, 인증, 서비스 로직 및 문서 개선

This commit is contained in:
2026-04-15 00:48:22 +09:00
parent 36fbb0879e
commit 0e9d2a16d8
17 changed files with 864 additions and 18 deletions
+15
View File
@@ -2,6 +2,7 @@ from fastapi.testclient import TestClient
from app.core.config import Settings
from app.core.config import get_settings
from app.core.security import mask_secret
from app.domain.models import User
from app.main import app, create_app
@@ -104,3 +105,17 @@ def test_startup_does_not_bootstrap_when_users_exist() -> None:
assert repo.created == []
assert repo.closed is True
def test_mask_secret_keeps_prefix_and_suffix() -> None:
masked = mask_secret("abcdefghijklmnopqrstuvwxyz", prefix=6, suffix=4)
assert masked.startswith("abcdef")
assert masked.endswith("wxyz")
assert "ghijklmnopqrstuv" not in masked
def test_mask_secret_short_value_is_fully_masked() -> None:
masked = mask_secret("abcd", prefix=3, suffix=2)
assert masked == "****"