현재 작업 상태 저장
This commit is contained in:
parent
07cc67761e
commit
6bd91b0d5e
674 changed files with 8726 additions and 298 deletions
|
|
@ -222,11 +222,13 @@ class RuntimeFallbackPolicyTest(unittest.IsolatedAsyncioTestCase):
|
|||
auth_dev_login_enabled=True,
|
||||
auto_seed_personas=True,
|
||||
allow_seed_persona_fallback=True,
|
||||
voice_poc_sample_tts_enabled=True,
|
||||
)
|
||||
|
||||
self.assertIn("AUTH_DEV_LOGIN_ENABLED", str(caught.exception))
|
||||
self.assertIn("AUTO_SEED_PERSONAS", str(caught.exception))
|
||||
self.assertIn("ALLOW_SEED_PERSONA_FALLBACK", str(caught.exception))
|
||||
self.assertIn("VIGNETTE_VOICE_POC_SAMPLE_TTS", str(caught.exception))
|
||||
|
||||
def test_non_dev_rejects_missing_public_runtime_config(self) -> None:
|
||||
with self.assertRaises(ValueError) as caught:
|
||||
|
|
@ -264,6 +266,43 @@ class RuntimeFallbackPolicyTest(unittest.IsolatedAsyncioTestCase):
|
|||
self.assertEqual(cfg.environment, "staging")
|
||||
self.assertEqual(cfg.cors_origins, ["https://vignette.chanpaca.net"])
|
||||
|
||||
def test_non_dev_accepts_vnet_frontend_origin_map(self) -> None:
|
||||
cfg = Settings(
|
||||
environment="prod",
|
||||
auth_dev_login_enabled=False,
|
||||
auto_seed_personas=False,
|
||||
allow_seed_persona_fallback=False,
|
||||
session_secret="prod-secret-change-me",
|
||||
oauth_google_client_id="google-client-id",
|
||||
oauth_google_client_secret="google-client-secret",
|
||||
frontend_base_url="https://vignette.chanpaca.net",
|
||||
frontend_origin_map={
|
||||
"api-vignette.chanpaca.net": "https://vignette.chanpaca.net",
|
||||
"api-vnet.18ka.net": "https://vnet.18ka.net",
|
||||
},
|
||||
cors_origins=["https://vignette.chanpaca.net", "https://vnet.18ka.net"],
|
||||
)
|
||||
|
||||
self.assertEqual(cfg.frontend_origin_map["api-vnet.18ka.net"], "https://vnet.18ka.net")
|
||||
self.assertIn("https://vnet.18ka.net", cfg.cors_origins)
|
||||
|
||||
def test_non_dev_rejects_local_frontend_origin_map(self) -> None:
|
||||
with self.assertRaises(ValueError) as caught:
|
||||
Settings(
|
||||
environment="prod",
|
||||
auth_dev_login_enabled=False,
|
||||
auto_seed_personas=False,
|
||||
allow_seed_persona_fallback=False,
|
||||
session_secret="prod-secret-change-me",
|
||||
oauth_google_client_id="google-client-id",
|
||||
oauth_google_client_secret="google-client-secret",
|
||||
frontend_base_url="https://vignette.chanpaca.net",
|
||||
frontend_origin_map={"api.example.test": "http://localhost:9999"},
|
||||
cors_origins=["https://vignette.chanpaca.net"],
|
||||
)
|
||||
|
||||
self.assertIn("FRONTEND_ORIGIN_MAP", str(caught.exception))
|
||||
|
||||
def test_non_dev_accepts_explicit_local_vite_cors_ports(self) -> None:
|
||||
cfg = Settings(
|
||||
environment="prod",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue