diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-12-02 21:20:17 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-12-02 21:20:17 +0000 |
| commit | 72683beea066d066637e747c40dc859fb709babf (patch) | |
| tree | 2db3462ebbcb7501e56491148cc3ffa7aa294071 /grasp-audit/examples | |
| parent | 5c10ca008413744b09136618eaa85275c997704c (diff) | |
refactor: rename AuditMode variants and change CLI default to shared
Breaking change: Renamed AuditMode enum variants for clarity:
- AuditMode::CI -> AuditMode::Isolated (fresh fixtures per test)
- AuditMode::Production -> AuditMode::Shared (reuse fixtures across tests)
Config constructors renamed (with deprecated aliases):
- AuditConfig::ci() -> AuditConfig::isolated()
- AuditConfig::production() -> AuditConfig::shared()
CLI default changed from 'ci' to 'shared' mode, which enables
fixture caching across tests. This fixes the issue where fixtures
were being re-created for every test in CLI mode.
Fixture caching behavior:
- Shared mode (CLI default): Uses client's cache, fixtures reused
- Isolated mode (for cargo test): Local cache per TestContext
Diffstat (limited to 'grasp-audit/examples')
| -rw-r--r-- | grasp-audit/examples/simple_audit.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/grasp-audit/examples/simple_audit.rs b/grasp-audit/examples/simple_audit.rs index e363d5c..57d4ac8 100644 --- a/grasp-audit/examples/simple_audit.rs +++ b/grasp-audit/examples/simple_audit.rs | |||
| @@ -6,8 +6,8 @@ use grasp_audit::*; | |||
| 6 | 6 | ||
| 7 | #[tokio::main] | 7 | #[tokio::main] |
| 8 | async fn main() -> Result<()> { | 8 | async fn main() -> Result<()> { |
| 9 | // Create audit config for CI testing | 9 | // Create audit config with shared fixtures (default for CLI) |
| 10 | let config = AuditConfig::ci(); | 10 | let config = AuditConfig::shared(); |
| 11 | 11 | ||
| 12 | println!("GRASP Audit Example"); | 12 | println!("GRASP Audit Example"); |
| 13 | println!("=================="); | 13 | println!("=================="); |