Files
foxhunt/services/integration_tests/Cargo.toml
jgrusewski 1aafb46a1b Wave 147 Phase 2: Fix .env loading in integration tests
## Problem
Integration tests failed to load JWT_SECRET from .env file, causing 19/49 E2E tests to fail with authentication errors.

## Root Cause
cargo test doesn't automatically load .env files. Tests need explicit dotenvy integration.

## Solution
1. Added dotenvy dependency to integration_tests/Cargo.toml
2. Added automatic .env loading to get_test_jwt_secret() function
3. Made .env loading idempotent (safe to call multiple times)

## Test Results
- Service Health: 26/26 passing (100%)
- Backtesting: 23/23 passing (100%)
- Total: 49/49 passing (100%)

## Files Modified
- services/integration_tests/Cargo.toml (+3 lines)
- services/integration_tests/tests/common/auth_helpers.rs (+3 lines)

## Agents
- Agent 401: .env loading fix
- Agent 402: Final E2E validation (100%)
- Agent 403: Git commit

🎉 Generated with Claude Code
2025-10-12 18:19:45 +02:00

50 lines
984 B
TOML

[package]
name = "integration_tests"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
publish = false
[dependencies]
# Async runtime
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "time"] }
futures.workspace = true
# gRPC client
tonic = { workspace = true }
tonic-prost.workspace = true
prost = { workspace = true }
# HTTP client for metrics scraping
reqwest = { workspace = true, features = ["json"] }
# Serialization
serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
# JWT for authentication
jsonwebtoken.workspace = true
# Error handling
anyhow.workspace = true
thiserror.workspace = true
# Logging
tracing.workspace = true
# UUID
uuid = { workspace = true, features = ["v4"] }
# Time handling
chrono = { workspace = true }
# Environment variables
dotenvy = "0.15"
[dev-dependencies]
# Test utilities
serial_test.workspace = true
[build-dependencies]
tonic-prost-build.workspace = true