mirror of
https://github.com/zvx-echo6/central.git
synced 2026-05-21 18:14:44 +02:00
test: remove TomlConfigSource and config_source flag tests
TOML-related tests no longer needed after Phase C retirement. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
c6f4f3b081
commit
a362b7b93e
2 changed files with 0 additions and 190 deletions
|
|
@ -355,40 +355,3 @@ class TestRateLimitGuarantee:
|
|||
f"Multiple NOTIFYs should not cause extra polls."
|
||||
)
|
||||
|
||||
|
||||
class TestBootstrapConfigFlag:
|
||||
"""Tests for CENTRAL_CONFIG_SOURCE bootstrap flag."""
|
||||
|
||||
def test_default_is_toml(self) -> None:
|
||||
"""Default config_source is 'toml'."""
|
||||
from central.bootstrap_config import Settings
|
||||
|
||||
# Create settings with minimal required fields
|
||||
settings = Settings(
|
||||
db_dsn="postgresql://test@localhost/test",
|
||||
_env_file=None,
|
||||
)
|
||||
assert settings.config_source == "toml"
|
||||
|
||||
def test_accepts_db(self, monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
"""config_source accepts 'db' value."""
|
||||
from central.bootstrap_config import Settings, get_settings
|
||||
|
||||
get_settings.cache_clear()
|
||||
monkeypatch.setenv("CENTRAL_CONFIG_SOURCE", "db")
|
||||
monkeypatch.setenv("CENTRAL_DB_DSN", "postgresql://test@localhost/test")
|
||||
|
||||
settings = get_settings()
|
||||
assert settings.config_source == "db"
|
||||
|
||||
def test_rejects_invalid(self, monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
"""config_source rejects invalid values."""
|
||||
from pydantic import ValidationError
|
||||
from central.bootstrap_config import Settings, get_settings
|
||||
|
||||
get_settings.cache_clear()
|
||||
monkeypatch.setenv("CENTRAL_CONFIG_SOURCE", "invalid")
|
||||
monkeypatch.setenv("CENTRAL_DB_DSN", "postgresql://test@localhost/test")
|
||||
|
||||
with pytest.raises(ValidationError):
|
||||
get_settings()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue