[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

@@ -20,6 +20,7 @@ use serde_json::json;
// ============================================================================
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_create_sensor_minimal() {
let pool = create_test_pool().await.unwrap();
@@ -68,6 +69,7 @@ async fn test_create_sensor_minimal() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_create_sensor_with_param_schema() {
let pool = create_test_pool().await.unwrap();
@@ -119,6 +121,7 @@ async fn test_create_sensor_with_param_schema() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_create_sensor_without_pack() {
let pool = create_test_pool().await.unwrap();
@@ -150,6 +153,7 @@ async fn test_create_sensor_without_pack() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_create_sensor_duplicate_ref_fails() {
let pool = create_test_pool().await.unwrap();
@@ -199,6 +203,7 @@ async fn test_create_sensor_duplicate_ref_fails() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_create_sensor_invalid_ref_format_fails() {
let pool = create_test_pool().await.unwrap();
@@ -252,6 +257,7 @@ async fn test_create_sensor_invalid_ref_format_fails() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_create_sensor_invalid_pack_fails() {
let pool = create_test_pool().await.unwrap();
@@ -288,6 +294,7 @@ async fn test_create_sensor_invalid_pack_fails() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_create_sensor_invalid_trigger_fails() {
let pool = create_test_pool().await.unwrap();
@@ -319,6 +326,7 @@ async fn test_create_sensor_invalid_trigger_fails() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_create_sensor_invalid_runtime_fails() {
let pool = create_test_pool().await.unwrap();
@@ -354,6 +362,7 @@ async fn test_create_sensor_invalid_runtime_fails() {
// ============================================================================
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_find_by_id_exists() {
let pool = create_test_pool().await.unwrap();
@@ -397,6 +406,7 @@ async fn test_find_by_id_exists() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_find_by_id_not_exists() {
let pool = create_test_pool().await.unwrap();
@@ -405,6 +415,7 @@ async fn test_find_by_id_not_exists() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_get_by_id_exists() {
let pool = create_test_pool().await.unwrap();
@@ -443,6 +454,7 @@ async fn test_get_by_id_exists() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_get_by_id_not_exists_fails() {
let pool = create_test_pool().await.unwrap();
@@ -452,6 +464,7 @@ async fn test_get_by_id_not_exists_fails() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_find_by_ref_exists() {
let pool = create_test_pool().await.unwrap();
@@ -494,6 +507,7 @@ async fn test_find_by_ref_exists() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_find_by_ref_not_exists() {
let pool = create_test_pool().await.unwrap();
@@ -504,6 +518,7 @@ async fn test_find_by_ref_not_exists() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_get_by_ref_exists() {
let pool = create_test_pool().await.unwrap();
@@ -544,6 +559,7 @@ async fn test_get_by_ref_exists() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_get_by_ref_not_exists_fails() {
let pool = create_test_pool().await.unwrap();
@@ -553,6 +569,7 @@ async fn test_get_by_ref_not_exists_fails() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_list_all_sensors() {
let pool = create_test_pool().await.unwrap();
@@ -610,6 +627,7 @@ async fn test_list_all_sensors() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_list_empty() {
let pool = create_test_pool().await.unwrap();
@@ -624,6 +642,7 @@ async fn test_list_empty() {
// ============================================================================
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_update_label() {
let pool = create_test_pool().await.unwrap();
@@ -676,6 +695,7 @@ async fn test_update_label() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_update_description() {
let pool = create_test_pool().await.unwrap();
@@ -720,6 +740,7 @@ async fn test_update_description() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_update_entrypoint() {
let pool = create_test_pool().await.unwrap();
@@ -764,6 +785,7 @@ async fn test_update_entrypoint() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_update_enabled_status() {
let pool = create_test_pool().await.unwrap();
@@ -823,6 +845,7 @@ async fn test_update_enabled_status() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_update_param_schema() {
let pool = create_test_pool().await.unwrap();
@@ -877,6 +900,7 @@ async fn test_update_param_schema() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_update_multiple_fields() {
let pool = create_test_pool().await.unwrap();
@@ -929,6 +953,7 @@ async fn test_update_multiple_fields() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_update_no_changes() {
let pool = create_test_pool().await.unwrap();
@@ -978,6 +1003,7 @@ async fn test_update_no_changes() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_update_nonexistent_sensor_fails() {
let pool = create_test_pool().await.unwrap();
@@ -995,6 +1021,7 @@ async fn test_update_nonexistent_sensor_fails() {
// ============================================================================
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_delete_existing_sensor() {
let pool = create_test_pool().await.unwrap();
@@ -1037,6 +1064,7 @@ async fn test_delete_existing_sensor() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_delete_nonexistent_sensor() {
let pool = create_test_pool().await.unwrap();
@@ -1045,6 +1073,7 @@ async fn test_delete_nonexistent_sensor() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_delete_sensor_when_pack_deleted() {
let pool = create_test_pool().await.unwrap();
@@ -1088,6 +1117,7 @@ async fn test_delete_sensor_when_pack_deleted() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_delete_sensor_when_trigger_deleted() {
let pool = create_test_pool().await.unwrap();
@@ -1131,6 +1161,7 @@ async fn test_delete_sensor_when_trigger_deleted() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_delete_sensor_when_runtime_deleted() {
let pool = create_test_pool().await.unwrap();
@@ -1178,6 +1209,7 @@ async fn test_delete_sensor_when_runtime_deleted() {
// ============================================================================
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_find_by_trigger() {
let pool = create_test_pool().await.unwrap();
@@ -1252,6 +1284,7 @@ async fn test_find_by_trigger() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_find_by_trigger_no_sensors() {
let pool = create_test_pool().await.unwrap();
@@ -1273,6 +1306,7 @@ async fn test_find_by_trigger_no_sensors() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_find_enabled() {
let pool = create_test_pool().await.unwrap();
@@ -1329,6 +1363,7 @@ async fn test_find_enabled() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_find_enabled_empty() {
let pool = create_test_pool().await.unwrap();
@@ -1368,6 +1403,7 @@ async fn test_find_enabled_empty() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_find_by_pack() {
let pool = create_test_pool().await.unwrap();
@@ -1453,6 +1489,7 @@ async fn test_find_by_pack() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_find_by_pack_no_sensors() {
let pool = create_test_pool().await.unwrap();
@@ -1473,6 +1510,7 @@ async fn test_find_by_pack_no_sensors() {
// ============================================================================
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_created_timestamp_set_automatically() {
let pool = create_test_pool().await.unwrap();
@@ -1514,6 +1552,7 @@ async fn test_created_timestamp_set_automatically() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_updated_timestamp_changes_on_update() {
let pool = create_test_pool().await.unwrap();
@@ -1564,6 +1603,7 @@ async fn test_updated_timestamp_changes_on_update() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_updated_timestamp_unchanged_on_read() {
let pool = create_test_pool().await.unwrap();
@@ -1614,6 +1654,7 @@ async fn test_updated_timestamp_unchanged_on_read() {
// ============================================================================
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_param_schema_complex_structure() {
let pool = create_test_pool().await.unwrap();
@@ -1688,6 +1729,7 @@ async fn test_param_schema_complex_structure() {
}
#[tokio::test]
#[ignore = "integration test — requires database"]
async fn test_param_schema_can_be_null() {
let pool = create_test_pool().await.unwrap();