forked from intel/pmem-csi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: catch unexpected modifications by operator
The operator had a bug where its change detection caused it to update objects unnecessarily. This wasn't caught before by the tests because the modified objects still had the expected content (as far as we know, at least - intel#742 still lacks a proper explanation). Now the update unit test catches that bug: TestDeploymentController/Kubernetes_1.18/updating/pmemPercentage_in_default_deployment: deployment_controller_test.go:264: Error Trace: deployment_controller_test.go:264 deployment_controller_test.go:559 deployment_controller_test.go:584 Error: Received unexpected error: deployed driver different from expected deployment: object was modified unnecessarily: "pmem-csi-with-defaults-node" of type "apps/v1, Kind=DaemonSet" in namespace "test-namespace" object was modified unnecessarily: "pmem-csi-with-defaults-controller" of type "apps/v1, Kind=StatefulSet" in namespace "test-namespace" Test: TestDeploymentController/Kubernetes_1.18/updating/pmemPercentage_in_default_deployment Messages: validate deployment We cannot use the same validation during E2E testing because the app controllers also modify the objects by setting their status.
- Loading branch information
Showing
4 changed files
with
127 additions
and
62 deletions.
There are no files selected for viewing
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
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
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
Oops, something went wrong.