# Cargo configuration for orchestrator testing and benchmarking

[env]
# Test environment variables
RUST_BACKTRACE = { value = "1", condition = { env-not-set = ["CI"] } }
RUST_LOG = { value = "debug", condition = { env-not-set = ["CI"] } }
RUST_TEST_THREADS = "1"

[alias]
# Test aliases for convenience
test-all = "test --all-features"
test-factory = "test --test factory_tests"
test-fs = "test --lib --bin orchestrator"
test-integration = "test --test storage_integration"
test-migration = "test --test migration_tests"
test-surrealdb = "test --features surrealdb"
test-unit = "test --lib"

# Benchmark aliases
bench-all = "bench --all-features"
bench-fs = "bench --bench storage_benchmarks -- filesystem"
bench-migration = "bench --bench migration_benchmarks"
bench-storage = "bench --bench storage_benchmarks"
bench-surrealdb = "bench --features surrealdb --bench storage_benchmarks -- surrealdb"

# Coverage and documentation
doc-test = "test --doc --all-features"
test-coverage = "tarpaulin --all-features --out html"

[target.'cfg(test)']
rustflags = ["-C", "instrument-coverage"]

[build]
# Enable additional lints for testing builds
# Note: unused-crate-dependencies disabled for library crate due to false positives
# with dependencies used in submodules but not lib.rs root
rustflags = ["-W", "unused-extern-crates", "-W", "rust-2021-compatibility"]
