Skip to content

E2E: Reorganize tests and Fluent Harness#178

Merged
rmanibus merged 1 commit into
mainfrom
e2e-refactor-gh-173
Apr 2, 2026
Merged

E2E: Reorganize tests and Fluent Harness#178
rmanibus merged 1 commit into
mainfrom
e2e-refactor-gh-173

Conversation

@rmanibus
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 repo handle from InitEncrypted / InitUnencrypted, removing legacy “unencrypted” method variants.
  • Updated forget CLI + 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.

Comment thread e2e/feature_diff_test.go Outdated
Comment thread cmd/cloudstic/cmd_forget.go Outdated
Comment thread cmd/cloudstic/cmd_forget.go Outdated
Comment thread internal/engine/forget.go Outdated
Comment thread e2e/feature_break_lock_test.go Outdated
Comment thread e2e/feature_dry_run_test.go Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@rmanibus rmanibus added this to the v1.14.0 milestone Apr 2, 2026
@rmanibus rmanibus added the chore Maintenance and tooling changes label Apr 2, 2026
@rmanibus rmanibus force-pushed the e2e-refactor-gh-173 branch 2 times, most recently from 70cd8ec to f891ead Compare April 2, 2026 10:03
@rmanibus rmanibus force-pushed the e2e-refactor-gh-173 branch from f891ead to e2bc76b Compare April 2, 2026 10:13
@rmanibus rmanibus merged commit 44fd6ef into main Apr 2, 2026
11 checks passed
@rmanibus rmanibus deleted the e2e-refactor-gh-173 branch April 2, 2026 10:18
@rmanibus rmanibus added test and removed chore Maintenance and tooling changes labels Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refine E2E feature matrix with explicit capability coverage

2 participants