Test Fixtures
This directory contains test data and sample files used across integration and E2E tests.
Files
Configuration Files
sample_config.yaml- Complete, valid configuration with all optionsminimal_config.yaml- Minimal configuration with only required fields
Kubernetes Manifests
rust_agent_deployment.yaml- Sample Rust agent deployment with PVC and service
Usage
Load fixtures in tests using the helper function:
use std::path::PathBuf;
let fixture_path = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.join("tests/fixtures/sample_config.yaml");
let content = std::fs::read_to_string(fixture_path).unwrap();Or use the helper module:
mod helpers;
use helpers::load_fixture;
let config = load_fixture("sample_config.yaml");Adding New Fixtures
When adding new fixtures:
- Use descriptive names that indicate the purpose
- Add documentation comments explaining what the fixture represents
- Keep fixtures minimal but valid
- Update this README with the new fixture
- Version control all fixtures
Guidelines
- Fixtures should be self-contained and not depend on external resources
- Use placeholder values for secrets (e.g.,
${SECRET}) - Keep fixtures up to date with schema changes
- Validate fixtures are well-formed before committing