初始化提交
Some checks failed
CI / Check / macos-latest (push) Has been cancelled
CI / Check / ubuntu-latest (push) Has been cancelled
CI / Check / windows-latest (push) Has been cancelled
CI / Test / macos-latest (push) Has been cancelled
CI / Test / ubuntu-latest (push) Has been cancelled
CI / Test / windows-latest (push) Has been cancelled
CI / Clippy (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / Security Audit (push) Has been cancelled
CI / Secrets Scan (push) Has been cancelled
CI / Install Script Smoke Test (push) Has been cancelled

This commit is contained in:
iven
2026-03-01 16:24:24 +08:00
commit 92e5def702
492 changed files with 211343 additions and 0 deletions

40
tests/e2e_test.rs Normal file
View File

@@ -0,0 +1,40 @@
//! End-to-end (E2E) tests for OpenFang.
//!
//! These tests boot the real daemon with actual HTTP endpoints and test
//! the full system integration. Tests can run in parallel using different
//! ports.
//!
//! ## Running Tests
//!
//! ```bash
//! # Run all E2E tests
//! cargo test --test e2e_test
//!
//! # Run specific test
//! cargo test --test e2e_test -- test_health_endpoint
//!
//! # Run with LLM integration (requires GROQ_API_KEY)
//! GROQ_API_KEY=your_key cargo test --test e2e_test -- --ignored
//! ```
//!
//! ## Parallel Execution
//!
//! Each test gets its own isolated environment:
//! - Unique random port (bound to 127.0.0.1:0)
//! - Isolated temp directory for data
//! - Separate kernel instance
//!
//! Tests are designed to be independent and can run concurrently.
// Common test utilities
mod e2e_common;
// Test fixtures
mod e2e_fixtures;
// Test modules
mod e2e_api_test;
// Re-export for convenience
pub use e2e_common::*;
pub use e2e_fixtures::*;