Skip to content

Replace insta CLI tests with dual-mode VHS snapshot testing#15

Draft
sartaj wants to merge 2 commits intomainfrom
sartaj-refactor-tests
Draft

Replace insta CLI tests with dual-mode VHS snapshot testing#15
sartaj wants to merge 2 commits intomainfrom
sartaj-refactor-tests

Conversation

@sartaj
Copy link
Contributor

@sartaj sartaj commented Feb 21, 2026

Summary

  • Remove dead/replaced Rust snapshot tests (api_snaps.rs, cli_example_snaps.rs) and their .snap files. Wizard unit tests stay.
  • Parameterize VHS demo tapes with TEST_MODE env var: mock diffs output against committed expected files, prod (default) smoke-tests non-empty output.
  • Add mock-mode to the synthetic E2E tape: pre-populates repos from mocks/, skips clone, runs logs | tag + build.
  • Add govbot mock schema validation job to validate-snapshots.yml.
  • Add TESTING.md documenting data lineage, testing tiers, and how to run/update everything.

Test plan

  • cargo test passes (12 wizard tests)
  • All 3 demo tapes pass in mock mode locally (TEST_MODE=mock vhs tapes/*.tape)
  • Synthetic test passes in mock mode locally
  • Intentionally broken expected file correctly fails the tape
  • CI terminal-screenshots.yml passes (Generate Terminal GIFs - Mock Mode)
  • CI validate-snapshots.yml passes (govbot-snapshots + Validate Govbot Mock Data)
  • CI synthetic-test.yml passes (Govbot Wizard & Pipeline)

🤖 Generated with Claude Code

sartaj and others added 2 commits February 20, 2026 23:22
Remove api_snaps.rs (dead code referencing nonexistent path),
cli_example_snaps.rs, and their associated .snap files. Keep
wizard_tests.rs (pure unit tests).

VHS tapes now run in two modes via TEST_MODE env var:
- mock: diffs output against committed expected files (PR, fast)
- prod: smoke tests output is non-empty (nightly, live data)

Add TESTING.md documenting data lineage, testing tiers, and the
dual-mode approach. Add govbot mock schema validation to CI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nism

jwalk parallel filesystem traversal produces different ordering on
macOS vs Linux. Sort both actual and expected before comparing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant