central/tests
Ubuntu 1abdf45375 test: add ConfigSource and hot-reload rate-limit tests
- TomlConfigSource tests: list/get adapters, watch_for_changes no-op
- DbConfigSource tests: list/get adapters with DB fixtures
- create_config_source factory tests
- NOTIFY integration test for DbConfigSource
- Rate-limit guarantee tests:
  - Cadence change respects last_poll time
  - Gap exceeding new cadence polls immediately
  - Enable/disable/enable respects rate limit
  - Multiple rapid changes no extra polls
- Bootstrap flag validation tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-16 01:55:47 +00:00
..
__init__.py scaffold: initial repository structure 2026-05-15 19:16:24 +00:00
README.md docs(tests): add README documenting CENTRAL_TEST_DB_DSN env var 2026-05-16 01:36:40 +00:00
test_bootstrap_config.py feat(config): add bootstrap config from environment 2026-05-15 23:07:33 +00:00
test_config_source.py test: add ConfigSource and hot-reload rate-limit tests 2026-05-16 01:55:47 +00:00
test_config_store.py feat(config_store): add listener reconnect with exponential backoff 2026-05-16 01:36:35 +00:00
test_crypto.py feat(config): add AES-256-GCM crypto primitives 2026-05-15 23:07:41 +00:00
test_models.py fix(tests): replace echo6 reference with central.local 2026-05-16 01:36:44 +00:00
test_nws_normalization.py runtime: NWS adapter, supervisor, archive consumer, systemd units 2026-05-15 21:29:08 +00:00
test_supervisor_hotreload.py test: add ConfigSource and hot-reload rate-limit tests 2026-05-16 01:55:47 +00:00

Central Tests

Test Database

Some tests (notably test_config_store.py) require a real PostgreSQL database. By default, tests connect to:

postgresql://central_test:testpass@localhost/central_test

If your test database uses different credentials, set the CENTRAL_TEST_DB_DSN environment variable:

export CENTRAL_TEST_DB_DSN="postgresql://myuser:mypass@localhost/mydb"
uv run pytest tests/test_config_store.py