marking integration tests
Some checks failed
CI / Rustfmt (push) Successful in 22s
CI / Clippy (push) Failing after 1m54s
CI / Cargo Audit & Deny (push) Successful in 33s
CI / Web Blocking Checks (push) Successful in 49s
CI / Security Blocking Checks (push) Successful in 8s
CI / Web Advisory Checks (push) Successful in 32s
CI / Security Advisory Checks (push) Successful in 37s
CI / Tests (push) Failing after 8m46s

This commit is contained in:
2026-03-05 16:33:06 -06:00
parent 4b0000c116
commit 48b6ca6bd7
13 changed files with 102 additions and 152 deletions

View File

@@ -6,6 +6,9 @@ authors.workspace = true
license.workspace = true
repository.workspace = true
[features]
integration-tests = []
[lib]
name = "attune_api"
path = "src/lib.rs"
@@ -77,7 +80,7 @@ tempfile = { workspace = true }
# Authentication
argon2 = { workspace = true }
rand = "0.9"
rand = "0.10"
# HMAC and cryptography
hmac = "0.12"

View File

@@ -1,3 +1,4 @@
#![cfg(feature = "integration-tests")]
//! Integration tests for health check and authentication endpoints
use axum::http::StatusCode;

View File

@@ -1,3 +1,4 @@
#![cfg(feature = "integration-tests")]
//! Integration tests for pack registry system
//!
//! This module tests:

View File

@@ -1,3 +1,4 @@
#![cfg(feature = "integration-tests")]
//! Integration tests for pack workflow sync and validation
mod helpers;

View File

@@ -1,3 +1,4 @@
#![cfg(feature = "integration-tests")]
//! Integration tests for SSE execution stream endpoint
//!
//! These tests verify that:
@@ -86,7 +87,6 @@ async fn create_test_execution(pool: &PgPool, action_id: i64) -> Result<Executio
/// Run with: cargo test test_sse_stream_receives_execution_updates -- --ignored --nocapture
/// After starting: cargo run -p attune-api -- -c config.test.yaml
#[tokio::test]
#[ignore]
async fn test_sse_stream_receives_execution_updates() -> Result<()> {
// Set up test context with auth
let ctx = TestContext::new().await?.with_auth().await?;
@@ -225,7 +225,6 @@ async fn test_sse_stream_receives_execution_updates() -> Result<()> {
/// Test that SSE stream correctly filters by execution_id
#[tokio::test]
#[ignore]
async fn test_sse_stream_filters_by_execution_id() -> Result<()> {
// Set up test context with auth
let ctx = TestContext::new().await?.with_auth().await?;
@@ -327,7 +326,6 @@ async fn test_sse_stream_filters_by_execution_id() -> Result<()> {
}
#[tokio::test]
#[ignore]
async fn test_sse_stream_requires_authentication() -> Result<()> {
// Try to connect without token
let sse_url = "http://localhost:8080/api/v1/executions/stream";
@@ -373,7 +371,6 @@ async fn test_sse_stream_requires_authentication() -> Result<()> {
/// Test streaming all executions (no filter)
#[tokio::test]
#[ignore]
async fn test_sse_stream_all_executions() -> Result<()> {
// Set up test context with auth
let ctx = TestContext::new().await?.with_auth().await?;
@@ -466,7 +463,6 @@ async fn test_sse_stream_all_executions() -> Result<()> {
/// Test that PostgreSQL NOTIFY triggers actually fire
#[tokio::test]
#[ignore]
async fn test_postgresql_notify_trigger_fires() -> Result<()> {
let ctx = TestContext::new().await?;

View File

@@ -1,3 +1,4 @@
#![cfg(feature = "integration-tests")]
//! Integration tests for webhook API endpoints
use attune_api::{AppState, Server};
@@ -108,7 +109,6 @@ async fn get_auth_token(app: &axum::Router, username: &str, password: &str) -> S
}
#[tokio::test]
#[ignore] // Run with --ignored flag when database is available
async fn test_enable_webhook() {
let state = setup_test_state().await;
let server = Server::new(std::sync::Arc::new(state.clone()));
@@ -151,7 +151,6 @@ async fn test_enable_webhook() {
}
#[tokio::test]
#[ignore]
async fn test_disable_webhook() {
let state = setup_test_state().await;
let server = Server::new(std::sync::Arc::new(state.clone()));
@@ -202,7 +201,6 @@ async fn test_disable_webhook() {
}
#[tokio::test]
#[ignore]
async fn test_regenerate_webhook_key() {
let state = setup_test_state().await;
let server = Server::new(std::sync::Arc::new(state.clone()));
@@ -254,7 +252,6 @@ async fn test_regenerate_webhook_key() {
}
#[tokio::test]
#[ignore]
async fn test_regenerate_webhook_key_not_enabled() {
let state = setup_test_state().await;
let server = Server::new(std::sync::Arc::new(state.clone()));
@@ -291,7 +288,6 @@ async fn test_regenerate_webhook_key_not_enabled() {
}
#[tokio::test]
#[ignore]
async fn test_receive_webhook() {
let state = setup_test_state().await;
let server = Server::new(std::sync::Arc::new(state.clone()));
@@ -362,7 +358,6 @@ async fn test_receive_webhook() {
}
#[tokio::test]
#[ignore]
async fn test_receive_webhook_invalid_key() {
let state = setup_test_state().await;
let server = Server::new(std::sync::Arc::new(state));
@@ -392,7 +387,6 @@ async fn test_receive_webhook_invalid_key() {
}
#[tokio::test]
#[ignore]
async fn test_receive_webhook_disabled() {
let state = setup_test_state().await;
let server = Server::new(std::sync::Arc::new(state.clone()));
@@ -442,7 +436,6 @@ async fn test_receive_webhook_disabled() {
}
#[tokio::test]
#[ignore]
async fn test_webhook_requires_auth_for_management() {
let state = setup_test_state().await;
let server = Server::new(std::sync::Arc::new(state.clone()));
@@ -475,7 +468,6 @@ async fn test_webhook_requires_auth_for_management() {
}
#[tokio::test]
#[ignore]
async fn test_receive_webhook_minimal_payload() {
let state = setup_test_state().await;
let server = Server::new(std::sync::Arc::new(state.clone()));

View File

@@ -1,3 +1,4 @@
#![cfg(feature = "integration-tests")]
//! Comprehensive integration tests for webhook security features (Phase 3)
//!
//! Tests cover:
@@ -122,7 +123,6 @@ fn generate_hmac_signature(payload: &[u8], secret: &str, algorithm: &str) -> Str
// ============================================================================
#[tokio::test]
#[ignore]
async fn test_webhook_hmac_sha256_valid() {
let state = setup_test_state().await;
let server = Server::new(std::sync::Arc::new(state.clone()));
@@ -189,7 +189,6 @@ async fn test_webhook_hmac_sha256_valid() {
}
#[tokio::test]
#[ignore]
async fn test_webhook_hmac_sha512_valid() {
let state = setup_test_state().await;
let server = Server::new(std::sync::Arc::new(state.clone()));
@@ -246,7 +245,6 @@ async fn test_webhook_hmac_sha512_valid() {
}
#[tokio::test]
#[ignore]
async fn test_webhook_hmac_invalid_signature() {
let state = setup_test_state().await;
let server = Server::new(std::sync::Arc::new(state.clone()));
@@ -302,7 +300,6 @@ async fn test_webhook_hmac_invalid_signature() {
}
#[tokio::test]
#[ignore]
async fn test_webhook_hmac_missing_signature() {
let state = setup_test_state().await;
let server = Server::new(std::sync::Arc::new(state.clone()));
@@ -355,7 +352,6 @@ async fn test_webhook_hmac_missing_signature() {
}
#[tokio::test]
#[ignore]
async fn test_webhook_hmac_wrong_secret() {
let state = setup_test_state().await;
let server = Server::new(std::sync::Arc::new(state.clone()));
@@ -418,7 +414,6 @@ async fn test_webhook_hmac_wrong_secret() {
// ============================================================================
#[tokio::test]
#[ignore]
async fn test_webhook_rate_limit_enforced() {
let state = setup_test_state().await;
let server = Server::new(std::sync::Arc::new(state.clone()));
@@ -494,7 +489,6 @@ async fn test_webhook_rate_limit_enforced() {
}
#[tokio::test]
#[ignore]
async fn test_webhook_rate_limit_disabled() {
let state = setup_test_state().await;
let server = Server::new(std::sync::Arc::new(state.clone()));
@@ -541,7 +535,6 @@ async fn test_webhook_rate_limit_disabled() {
// ============================================================================
#[tokio::test]
#[ignore]
async fn test_webhook_ip_whitelist_allowed() {
let state = setup_test_state().await;
let server = Server::new(std::sync::Arc::new(state.clone()));
@@ -612,7 +605,6 @@ async fn test_webhook_ip_whitelist_allowed() {
}
#[tokio::test]
#[ignore]
async fn test_webhook_ip_whitelist_blocked() {
let state = setup_test_state().await;
let server = Server::new(std::sync::Arc::new(state.clone()));
@@ -669,7 +661,6 @@ async fn test_webhook_ip_whitelist_blocked() {
// ============================================================================
#[tokio::test]
#[ignore]
async fn test_webhook_payload_size_limit_enforced() {
let state = setup_test_state().await;
let server = Server::new(std::sync::Arc::new(state.clone()));
@@ -720,7 +711,6 @@ async fn test_webhook_payload_size_limit_enforced() {
}
#[tokio::test]
#[ignore]
async fn test_webhook_payload_size_within_limit() {
let state = setup_test_state().await;
let server = Server::new(std::sync::Arc::new(state.clone()));

View File

@@ -1,3 +1,4 @@
#![cfg(feature = "integration-tests")]
//! Integration tests for workflow API endpoints
use attune_common::repositories::{