Created
July 7, 2022 14:35
-
-
Save lyarwood/070c5e4e7e34819aec2531bf5bbf4cdf to your computer and use it in GitHub Desktop.
Suggested changes to operator_test.go
This file contains 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
# git diff HEAD~1 | |
diff --git a/tests/operator_test.go b/tests/operator_test.go | |
index 8b4ded6af..c6eca91d9 100644 | |
--- a/tests/operator_test.go | |
+++ b/tests/operator_test.go | |
@@ -1515,17 +1515,22 @@ spec: | |
By("Sanity Checking Deployments infrastructure is deleted") | |
sanityCheckDeploymentsDeleted() | |
- if updateOperator { | |
- By("Deleting testing manifests") | |
- deleteTestingManifests(flags.TestingManifestPath) | |
+ By("Deleting testing manifests") | |
+ deleteTestingManifests(flags.TestingManifestPath) | |
- By("Deleting virt-operator installation") | |
- deleteOperator(flags.OperatorManifestPath) | |
+ // We always revert the operator back to the previous version to ensure this test is realistic and in line with what we expect users to do. | |
+ By("Deleting virt-operator installation") | |
+ deleteOperator(flags.OperatorManifestPath) | |
- By("Installing previous release of virt-operator") | |
- manifestURL := getUpstreamReleaseAssetURL(previousImageTag, "kubevirt-operator.yaml") | |
- installOperator(manifestURL) | |
- } | |
+ By("Installing previous release of virt-operator") | |
+ manifestURL := getUpstreamReleaseAssetURL(previousImageTag, "kubevirt-operator.yaml") | |
+ installOperator(manifestURL) | |
+ | |
+ // TODO - check here for conflicts between the currently installed older operator and the new operator. Skip the test if we know this would fail. | |
+ // As documeted within https://github.com/kubevirt/kubevirt/issues/2533 and https://kubevirt.io/user-guide/operations/updating_and_deletion/#updating-kubevirt-control-plane | |
+ | |
+ By("Re-installing testing manifests") | |
+ installTestingManifests(flags.TestingManifestPath) | |
// Install previous release of KubeVirt | |
By("Creating KubeVirt object") | |
@@ -1614,9 +1619,6 @@ spec: | |
if updateOperator { | |
By("Updating virt-operator installation") | |
installOperator(flags.OperatorManifestPath) | |
- | |
- By("Re-installing testing manifests") | |
- installTestingManifests(flags.TestingManifestPath) | |
} else { | |
By("Updating KubeVirt object With current tag") | |
patchKvVersionAndRegistry(kv.Name, curVersion, curRegistry) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment