c85c0068a2
- Replace all datetime.utcnow() with datetime.now(tz=timezone.utc) across 8 files - Fix 12 failing tests to match current implementation behavior - Fix pytest_plugins in non-top-level conftest (moved to root conftest.py) - Auto-fix 189 lint issues (import sorting, unused imports) - Add CI/CD pipeline infrastructure (ARC, ArgoCD, Kargo manifests) - Add values-beta.yaml and values-paper.yaml for staged deployments - Update GitHub Actions workflow to use self-hosted-gremlin runners - Add integration-test job to CI pipeline Result: 1596 passed, 0 failed, 0 warnings
33 lines
976 B
Python
33 lines
976 B
Python
"""Basic tests for shared config loader."""
|
|
from services.shared.config import AlertingConfig, AppConfig, load_config
|
|
|
|
|
|
def test_load_config_returns_app_config():
|
|
config = load_config()
|
|
assert isinstance(config, AppConfig)
|
|
|
|
|
|
def test_postgres_dsn_format():
|
|
config = load_config()
|
|
assert config.postgres.dsn.startswith("postgresql://")
|
|
|
|
|
|
def test_redis_url_format():
|
|
config = load_config()
|
|
assert config.redis.url.startswith("redis://")
|
|
|
|
|
|
def test_default_broker_mode():
|
|
config = load_config()
|
|
assert config.broker.mode == "paper"
|
|
|
|
|
|
def test_alerting_config_defaults():
|
|
config = load_config()
|
|
assert isinstance(config.alerting, AlertingConfig)
|
|
assert config.alerting.source_failure_threshold == 3
|
|
assert config.alerting.schema_failure_rate_threshold == 0.3
|
|
assert config.alerting.lake_lag_threshold_minutes == 60
|
|
assert config.alerting.broker_error_threshold == 3
|
|
assert config.alerting.check_interval_seconds == 120
|