E2E: Reorganize tests and Fluent Harness#178
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR reorganizes the E2E test suite into feature-focused specs, refactors the shared E2E harness into a fluent (type-driven) API, and extends forget to support filter-only execution (e.g., tag-based cleanup) as part of refining the explicit feature/capability matrix (Issue #173).
Changes:
- Split the previous misc E2E coverage into dedicated feature test files and updated existing tests to use the new fluent harness.
- Refactored the E2E harness to return an initialized
repohandle fromInitEncrypted/InitUnencrypted, removing legacy “unencrypted” method variants. - Updated
forgetCLI + engine validation to allow filter-only runs (no--keep-*) for tag-based cleanup.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/engine/forget.go | Allows policy execution when a non-empty snapshot filter is provided, even if keep policy is empty. |
| cmd/cloudstic/cmd_forget.go | Updates argument parsing/usage gating to support filter-only forget flows and route them through policy execution. |
| e2e/harness_test.go | Introduces fluent harness API returning a repo handle with auth args, removing legacy compatibility methods. |
| e2e/compatibility_smoke_test.go | Migrates smoke matrix test to the new fluent harness (repo). |
| e2e/feature_backup_restore_test.go | Migrates backup/restore feature tests to the fluent harness. |
| e2e/feature_break_lock_test.go | Adds a dedicated break-lock feature test using the matrix runner + fluent harness. |
| e2e/feature_cat_test.go | Adds feature tests for cat config and cat index/latest JSON outputs. |
| e2e/feature_completion_test.go | Splits completion coverage into its own feature test file. |
| e2e/feature_diff_test.go | Adds feature tests for diff, including snapshot-vs-snapshot behavior and parsing snapshot IDs from list. |
| e2e/feature_dry_run_test.go | Adds dedicated dry-run tests for backup and forget. |
| e2e/feature_encryption_test.go | Migrates encryption tests to fluent harness and expands coverage (init-required, recovery key, unencrypted lifecycle). |
| e2e/feature_exclude_test.go | Splits exclude-pattern coverage into its own feature test and migrates to fluent harness. |
| e2e/feature_integrity_test.go | Migrates integrity/check feature test to fluent harness. |
| e2e/feature_ls_test.go | Adds feature tests for ls (latest and by snapshot ID). |
| e2e/feature_partial_restore_test.go | Migrates partial restore tests to fluent harness. |
| e2e/feature_profiles_test.go | Splits profile/store workflow test into its own feature test file. |
| e2e/feature_retention_test.go | Migrates retention/forget policy tests to the fluent harness repo API. |
| e2e/feature_tags_test.go | Adds feature coverage for backup tags and forget --tag selective removal. |
| e2e/feature_misc_test.go | Removes the previous “misc” bucket after splitting into dedicated feature tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
70cd8ec to
f891ead
Compare
f891ead to
e2bc76b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reorganized E2E tests by splitting feature_misc_test.go, refactored harness into a Fluent API, and fixed forget command to support tag-based cleanup. Resolves #173.