feat: WireGuard metrics collector + integration test stack
Metrics collector (wiregui/collector.py): - Standalone process spawned by web app when WG_METRICS_ENABLED=true - Polls wg show dump every WG_METRICS_POLL_INTERVAL seconds (default 5) - Updates device stats in PostgreSQL - Pushes Prometheus-format metrics to VictoriaMetrics (if configured) - Graceful shutdown on SIGTERM Integration test stack (compose.yml): - Unified compose file for dev, test, and integration modes - VictoriaMetrics single-node TSDB for metrics storage - 3 mock WireGuard client containers generating ping traffic - Automated setup script seeds server keypair, admin user, client devices - make test-stack-up: one command to start everything - make test-stack-verify: validates metrics flowing end-to-end Infrastructure: - Makefile with targets for dev, test, integration, and production - Integration tests verify VictoriaMetrics has data for all 3 clients - Fix Dockerfile to include img/ directory - Separate TESTS.md for test tracking, clean TODO.md for features only
This commit is contained in:
parent
70eb9f6b12
commit
c5b66349d6
16 changed files with 932 additions and 115 deletions
|
|
@ -66,7 +66,7 @@ jobs:
|
|||
run: uv run alembic upgrade head
|
||||
|
||||
- name: Run unit tests
|
||||
run: uv run pytest tests/ --ignore=tests/e2e -v --tb=short
|
||||
run: uv run pytest tests/ --ignore=tests/e2e --ignore=tests/integration -v --tb=short
|
||||
|
||||
- name: Run E2E tests
|
||||
run: uv run pytest tests/e2e/ -v --tb=short
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ jobs:
|
|||
run: uv run alembic upgrade head
|
||||
|
||||
- name: Run unit tests
|
||||
run: uv run pytest tests/ --ignore=tests/e2e -v --tb=short
|
||||
run: uv run pytest tests/ --ignore=tests/e2e --ignore=tests/integration -v --tb=short
|
||||
|
||||
- name: Run E2E tests
|
||||
run: uv run pytest tests/e2e/ -v --tb=short
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue