CI / Check (pull_request) Successful in 8m15s
CI / Detect Changes (pull_request) Has been skipped
CI / Deploy Agent (pull_request) Has been skipped
CI / Deploy Dashboard (pull_request) Has been skipped
CI / Deploy Docs (pull_request) Has been skipped
CI / Deploy MCP (pull_request) Has been skipped
Wire the id-preserving mappers into a runnable, idempotent, reversible migration: - backfill_onboarded_targets(db, dry_run): repositories -> onboarded_targets; dast_targets fold into the linked repo target (append LiveUrl, promote type, relink dast_scan_runs/pentest_sessions history) or migrate standalone. Skips existing (by _id), writes a schema_migrations marker; dry-run computes the report without writing. Legacy collections are never deleted. - revert(db): replay the relink log, drop onboarded_targets + the log, clear the marker — restores the pre-migration state. - CLI: `compliance-agent migrate onboarding [--all | --tenant <id>] [--dry-run] [--revert]`, with DatabasePool::list_tenant_ids for --all. - database.rs: collection_named<T> accessor + list_tenant_ids helper. Integration test (real Mongo, local-only — CI is --lib) covers fold + relink + idempotency + revert end to end. 5 mapper unit tests run in CI. Closes #132. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
11 lines
344 B
Rust
11 lines
344 B
Rust
// E2E / Integration tests for the compliance-agent API.
|
|
//
|
|
// These tests require a running MongoDB instance. Set TEST_MONGODB_URI
|
|
// if it's not at the default `mongodb://root:example@localhost:27017`.
|
|
//
|
|
// Run with: cargo test -p compliance-agent --test e2e
|
|
// Or nightly: (via CI with MongoDB service container)
|
|
|
|
mod api;
|
|
mod migration;
|