[wip] cli capability parity
Some checks failed
CI / Rustfmt (push) Successful in 23s
CI / Cargo Audit & Deny (push) Successful in 30s
CI / Web Blocking Checks (push) Successful in 48s
CI / Security Blocking Checks (push) Successful in 8s
CI / Clippy (push) Failing after 1m55s
CI / Web Advisory Checks (push) Successful in 35s
CI / Security Advisory Checks (push) Successful in 37s
CI / Tests (push) Successful in 8m5s

This commit is contained in:
2026-03-06 16:58:50 -06:00
parent 48b6ca6bd7
commit 87d830f952
94 changed files with 3694 additions and 734 deletions

View File

@@ -21,6 +21,7 @@ use serde_json::json;
// ============================================================================
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_create_enforcement_minimal() {
let pool = create_test_pool().await.unwrap();
@@ -93,6 +94,7 @@ async fn test_create_enforcement_minimal() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_create_enforcement_with_event() {
let pool = create_test_pool().await.unwrap();
@@ -160,6 +162,7 @@ async fn test_create_enforcement_with_event() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_create_enforcement_with_conditions() {
let pool = create_test_pool().await.unwrap();
@@ -225,6 +228,7 @@ async fn test_create_enforcement_with_conditions() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_create_enforcement_with_any_condition() {
let pool = create_test_pool().await.unwrap();
@@ -287,6 +291,7 @@ async fn test_create_enforcement_with_any_condition() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_create_enforcement_without_rule_id() {
let pool = create_test_pool().await.unwrap();
@@ -310,6 +315,7 @@ async fn test_create_enforcement_without_rule_id() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_create_enforcement_with_invalid_rule_fails() {
let pool = create_test_pool().await.unwrap();
@@ -333,6 +339,7 @@ async fn test_create_enforcement_with_invalid_rule_fails() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_create_enforcement_with_nonexistent_event_succeeds() {
let pool = create_test_pool().await.unwrap();
@@ -363,6 +370,7 @@ async fn test_create_enforcement_with_nonexistent_event_succeeds() {
// ============================================================================
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_find_enforcement_by_id() {
let pool = create_test_pool().await.unwrap();
@@ -424,6 +432,7 @@ async fn test_find_enforcement_by_id() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_find_enforcement_by_id_not_found() {
let pool = create_test_pool().await.unwrap();
@@ -435,6 +444,7 @@ async fn test_find_enforcement_by_id_not_found() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_get_enforcement_by_id() {
let pool = create_test_pool().await.unwrap();
@@ -490,6 +500,7 @@ async fn test_get_enforcement_by_id() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_get_enforcement_by_id_not_found() {
let pool = create_test_pool().await.unwrap();
@@ -504,6 +515,7 @@ async fn test_get_enforcement_by_id_not_found() {
// ============================================================================
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_list_enforcements_empty() {
let pool = create_test_pool().await.unwrap();
@@ -513,6 +525,7 @@ async fn test_list_enforcements_empty() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_list_enforcements() {
let pool = create_test_pool().await.unwrap();
@@ -584,6 +597,7 @@ async fn test_list_enforcements() {
// ============================================================================
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_update_enforcement_status() {
let pool = create_test_pool().await.unwrap();
@@ -649,6 +663,7 @@ async fn test_update_enforcement_status() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_update_enforcement_status_transitions() {
let pool = create_test_pool().await.unwrap();
@@ -727,6 +742,7 @@ async fn test_update_enforcement_status_transitions() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_update_enforcement_payload() {
let pool = create_test_pool().await.unwrap();
@@ -789,6 +805,7 @@ async fn test_update_enforcement_payload() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_update_enforcement_both_fields() {
let pool = create_test_pool().await.unwrap();
@@ -852,6 +869,7 @@ async fn test_update_enforcement_both_fields() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_update_enforcement_no_changes() {
let pool = create_test_pool().await.unwrap();
@@ -915,6 +933,7 @@ async fn test_update_enforcement_no_changes() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_update_enforcement_not_found() {
let pool = create_test_pool().await.unwrap();
@@ -935,6 +954,7 @@ async fn test_update_enforcement_not_found() {
// ============================================================================
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_delete_enforcement() {
let pool = create_test_pool().await.unwrap();
@@ -995,6 +1015,7 @@ async fn test_delete_enforcement() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_delete_enforcement_not_found() {
let pool = create_test_pool().await.unwrap();
@@ -1008,6 +1029,7 @@ async fn test_delete_enforcement_not_found() {
// ============================================================================
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_find_enforcements_by_rule() {
let pool = create_test_pool().await.unwrap();
@@ -1100,6 +1122,7 @@ async fn test_find_enforcements_by_rule() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_find_enforcements_by_status() {
let pool = create_test_pool().await.unwrap();
@@ -1189,6 +1212,7 @@ async fn test_find_enforcements_by_status() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_find_enforcements_by_event() {
let pool = create_test_pool().await.unwrap();
@@ -1273,6 +1297,7 @@ async fn test_find_enforcements_by_event() {
// ============================================================================
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_delete_rule_sets_enforcement_rule_to_null() {
let pool = create_test_pool().await.unwrap();
@@ -1338,6 +1363,7 @@ async fn test_delete_rule_sets_enforcement_rule_to_null() {
// ============================================================================
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_enforcement_resolved_at_lifecycle() {
let pool = create_test_pool().await.unwrap();