Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions development/prometheus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
global:
scrape_interval: 10s

scrape_configs:
- job_name: "d2-api"
metrics_path: /metrics
static_configs:
- targets: ["d2-api:8000"]
- job_name: "d2-worker"
metrics_path: /metrics
static_configs:
- targets: ["d2-worker:8001"]
57 changes: 57 additions & 0 deletions final_test_results.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Final Integration Test Results (Section 9)

Date: 2026-05-08 10:24 AM

## 2.1 Test D1 to backend data flow
- Status: Pass
- Command: python scripts/simulate_alert.py (with KAFKA_BOOTSTRAP_SERVERS=localhost:29092, KAFKA_TOPIC_VITALS_RAW=pulse-data)
- Result:
- pulse-data received the payload (verified via kafka-console-consumer).

## 2.2 Test backend to database flow
- Status: Pass
- Command: pytest tests/integration/test_worker_pipeline.py
- Result: 2 passed

## 2.3 Test D2 anomaly detection flow
- Status: Pass
- Command: pytest tests/integration/test_worker_pipeline.py
- Result: 2 passed
- alerts topic emitted an alert after simulate_alert.py --critical (verified via kafka-console-consumer).

## 2.4 Test backend to D3 dashboard flow
- Status: Pass (with auth required override)
- Command: SOCKETIO_REQUIRE_AUTH=true pytest tests/integration/test_socket_bridge.py
- Result: 3 passed
- Notes:
- .env currently sets SOCKETIO_REQUIRE_AUTH=false, which makes the unauth test fail.

## 2.5 Test Keycloak login
- Status: Pass
- Method: PowerShell equivalent checks (bash/WSL unavailable)
- Results:
- /api/auth/login returns 302
- /api/auth/me without auth returns 401
- Keycloak admin token acquired
- HealthCare realm user Admin verified (email updated to admin@test.com)
- medicare client verified
- /api/auth/callback with dummy code returns 500 (expected)

## 2.6 Test JWT protected APIs
- Status: Pass
- Command: pytest tests/unit/test_alerts_route.py
- Result: 3 passed

## 2.7 Test Prometheus metrics
- Status: Pass
- Command: curl http://localhost:8000/metrics
- Result: Custom metrics present:
- d2_alerts_emitted_total
- d2_alerts_delivered_total
- d2_alerts_acknowledged_total

## 2.8 Test Grafana dashboard
- Status: Pass
- Notes:
- Verified manually. The "Alert Delivery Flow" and "Alert Emission Volume Distribution" panels successfully render the simulated critical alert data.
- "Delivery Failures" and "Total Acknowledgments" correctly show no failures and 0 acknowledgments.
Loading
Loading