diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-11-05 07:09:41 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-11-05 07:17:47 +0000 |
| commit | cb466fbc02b83c5788def5fef73f93573f5c1f70 (patch) | |
| tree | eb9d0293d2be16b8c4ed8a3a278ed9207f54b52d /grasp-audit/src | |
| parent | 74c7b090a6ec7f749a3a79dcb0c9a0a6bc198702 (diff) | |
test: improve test script with unique names and random ports
- Remove python3 dependency for port selection
- Use RANDOM for port selection in range 20000-30000
- Use unique container names based on PID: grasp-audit-run-294183
- Use unique temp directories: grasp-audit-run-XXXXXXXXXX
- Ensures parallel test runs don't conflict
Diffstat (limited to 'grasp-audit/src')
| -rw-r--r-- | grasp-audit/src/specs/nip01_smoke.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/grasp-audit/src/specs/nip01_smoke.rs b/grasp-audit/src/specs/nip01_smoke.rs index 20f80ea..5fddf5d 100644 --- a/grasp-audit/src/specs/nip01_smoke.rs +++ b/grasp-audit/src/specs/nip01_smoke.rs | |||
| @@ -295,9 +295,9 @@ mod tests { | |||
| 295 | #[tokio::test] | 295 | #[tokio::test] |
| 296 | #[ignore] // Ignore by default since it needs a running relay | 296 | #[ignore] // Ignore by default since it needs a running relay |
| 297 | async fn test_smoke_tests_against_relay() { | 297 | async fn test_smoke_tests_against_relay() { |
| 298 | // Use RELAY_URL env var if set, otherwise default to localhost:7000 | 298 | // RELAY_URL env var must be set - no default fallback |
| 299 | let relay_url = std::env::var("RELAY_URL") | 299 | let relay_url = std::env::var("RELAY_URL") |
| 300 | .unwrap_or_else(|_| "ws://localhost:7000".to_string()); | 300 | .expect("RELAY_URL environment variable must be set for integration tests"); |
| 301 | 301 | ||
| 302 | let config = AuditConfig::ci(); | 302 | let config = AuditConfig::ci(); |
| 303 | let client = AuditClient::new(&relay_url, config) | 303 | let client = AuditClient::new(&relay_url, config) |