Skip to content

Commit 303e6b9

Browse files
committed
refactor: project structure clean up
1 parent 9d60cd2 commit 303e6b9

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

integration/cache_tests.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,7 @@ async fn test_management_api_call_rate() {
192192
let final_metrics = get_auth_metrics(&fixture.ctx).await;
193193

194194
if let (Some(initial), Some(final_metrics)) = (initial_metrics, final_metrics) {
195-
let control_calls =
196-
final_metrics.control_calls - initial.control_calls;
195+
let control_calls = final_metrics.control_calls - initial.control_calls;
197196
let api_call_rate = (control_calls as f64 / num_requests as f64) * 100.0;
198197

199198
println!(
@@ -203,10 +202,7 @@ async fn test_management_api_call_rate() {
203202

204203
// Control call rate should be <10% with effective caching
205204
if api_call_rate > 10.0 {
206-
eprintln!(
207-
"Warning: High control call rate ({:.1}%) - expected <10%",
208-
api_call_rate
209-
);
205+
eprintln!("Warning: High control call rate ({:.1}%) - expected <10%", api_call_rate);
210206
}
211207
} else {
212208
println!("⚠ Metrics endpoint not available - skipping API call rate check");
@@ -265,17 +261,15 @@ struct AuthMetrics {
265261

266262
// Helper function to fetch and parse auth metrics (from internal port)
267263
async fn get_auth_metrics(ctx: &TestContext) -> Option<AuthMetrics> {
268-
let response =
269-
ctx.client.get(format!("{}/metrics", ctx.engine_mesh_url)).send().await.ok()?;
264+
let response = ctx.client.get(format!("{}/metrics", ctx.engine_mesh_url)).send().await.ok()?;
270265

271266
if !response.status().is_success() {
272267
return None;
273268
}
274269

275270
let metrics_text = response.text().await.ok()?;
276271

277-
let control_calls =
278-
parse_metric(&metrics_text, "infera_auth_control_calls_total");
272+
let control_calls = parse_metric(&metrics_text, "infera_auth_control_calls_total");
279273
let cache_hits = parse_metric(&metrics_text, "infera_auth_cache_hits_total");
280274
let cache_misses = parse_metric(&metrics_text, "infera_auth_cache_misses_total");
281275

integration/mod.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ use uuid::Uuid;
1818
mod auth_jwt_tests;
1919
mod cache_tests;
2020
mod concurrency_tests;
21-
mod e2e_workflows_tests;
2221
mod control_integration_tests;
22+
mod e2e_workflows_tests;
2323
mod resilience_tests;
2424
mod vault_isolation_tests;
2525

@@ -631,10 +631,7 @@ impl Drop for TestFixture {
631631
tokio::spawn(async move {
632632
let _ = ctx
633633
.client
634-
.delete(format!(
635-
"{}/v1/organizations/{}/vaults/{}",
636-
control_url, org_id, vault_id
637-
))
634+
.delete(format!("{}/v1/organizations/{}/vaults/{}", control_url, org_id, vault_id))
638635
.header("Authorization", format!("Bearer {}", session_id))
639636
.send()
640637
.await;

0 commit comments

Comments
 (0)