Expand e2e tests to cover specific upgrade bugs - #1013
Open
mallardduck wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands the end-to-end testing setup by adding a new isolated “upgrade/regression” e2e suite (starting with upgrade-metrics) to reproduce specific upgrade bugs against an older release and validate the fix with the current in-process operator.
Changes:
- Add
e2e/upgrade-metricsGinkgo suite that spins up its own k3d cluster and includes a regression test for a nilRestore.Spec.Prunemetrics crash scenario. - Restructure shared e2e fixtures into
e2e/fixtures/testdataand update backup e2e tests to consume them. - Adjust local vs CI command execution (Makefile) and update e2e runner and Helm packaging tag handling.
Reviewed changes
Copilot reviewed 14 out of 28 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/package-helm | Updates build-chart tag substitution to replace tag: v0.0.0-dev instead of %TAG%. |
| scripts/e2e | Runs all e2e packages with exported env vars and go test -p 2 parallelism. |
| Makefile | Runs via Docker locally only for specific targets (instead of all targets). |
| e2e/upgrade-metrics/testdata/metrics/restore-nil-prune.yaml | Adds test Restore fixture with omitted prune field. |
| e2e/upgrade-metrics/suite_test.go | Adds isolated k3d cluster lifecycle + client/chart setup for upgrade-metrics suite. |
| e2e/upgrade-metrics/README.md | Documents upgrade/regression suite conventions and usage. |
| e2e/upgrade-metrics/metrics_test.go | Adds regression test covering nil prune metrics crash in older version and verifies current behavior. |
| e2e/upgrade-metrics/helpers_test.go | Adds Helm install/uninstall helpers + cleanup utilities for upgrade suite. |
| e2e/README.md | Documents mixed isolation strategies (shared backup vs isolated upgrade suites) and parallel execution. |
| e2e/fixtures/testdata/restore/preserve-unknown-fields/customresourcedefinitions.apiextensions.k8s.io#v1/clusteralerts.management.cattle.io.json | Adds restore fixture content for preserve-unknown-fields scenario. |
| e2e/fixtures/testdata/restore/preserve-unknown-fields.tar.gz | Adds preserve-unknown-fields backup tar fixture. |
| e2e/fixtures/testdata/restore/encrypted-resources/secrets.#v1/application/application.json | Adds encrypted-resources fixture content. |
| e2e/fixtures/testdata/restore/encrypted-resources/namespaces.#v1/application.json | Adds encrypted-resources fixture content. |
| e2e/fixtures/testdata/restore/encrypted-resources.tar.gz | Adds encrypted-resources backup tar fixture. |
| e2e/fixtures/testdata/restore/deletion-grace-period-seconds/secrets.#v1/cattle-delete/secret-delete.json | Adds deletion-grace-period-seconds fixture content. |
| e2e/fixtures/testdata/restore/deletion-grace-period-seconds/namespaces.#v1/cattle-delete.json | Adds deletion-grace-period-seconds fixture content. |
| e2e/fixtures/testdata/restore/deletion-grace-period-seconds.tar.gz | Adds deletion-grace-period-seconds backup tar fixture. |
| e2e/fixtures/testdata/rancher-resource-set-full.yaml | Adds full ResourceSet YAML fixture. |
| e2e/fixtures/testdata/rancher-resource-set-basic.yaml | Adds basic ResourceSet YAML fixture. |
| e2e/fixtures/testdata/public.crt | Adds a certificate fixture file. |
| e2e/fixtures/testdata/private.key | Adds a private key fixture file. |
| e2e/fixtures/testdata/encryption.yaml | Adds apiserver encryption config fixture. |
| e2e/fixtures/test.go | Renames package to fixtures and switches embed root to testdata/. |
| e2e/backup/setup_test.go | Switches from e2e/test to e2e/fixtures helper import and usage. |
| e2e/backup/restore_test.go | Switches from e2e/test to e2e/fixtures helper import and usage. |
| e2e/backup/backup_test.go | Switches from e2e/test to e2e/fixtures helper import and usage. |
| charts/rancher-backup/values.yaml | Sets a valid default image tag (v0.0.0-dev) instead of %TAG%. |
| .gitignore | Ignores downloaded rancher-backup-*.tgz artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Introduced a reusable `scripts/e2e` script for running e2e tests locally and in CI. - Added restore tests to verify CRD default behavior for the Prune field and backward compatibility. - Included a unit test for `FmtVersionInfo` in the version package. Signed-off-by: Dan Pock <self@danpock.me>
mallardduck
force-pushed
the
e2e-regression-expansion
branch
from
July 8, 2026 16:50
e1d22cd to
0229d34
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.
No description provided.