forked from kubernetes-sigs/kubebuilder
-
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.
:sapling: Clean up plugin_cluster-test.go
Part of kubernetes-sigs#4135 This commits cleans up "plugin_cluster_test.go" to be less verbose and use better use of Gomega's capabilities. Notably, variables are used only when the output of some command is used later on in the test. If we only assert things about the command output, it is generally in-lined. Eventually functions are converted from `() error` to `(g Gomega)`, and Expects are converted to g.Expect inside the functions. All offsets have been removed, since this isn't "helper" code, we want to know which line the test failed on. Finally, the test for verifying available status has been fixed so that it checks the correct pod. Also, the "run-as-user" flag is passed in the "no options" case, since kubernetes doesn't allow the target pod to run as root.
- Loading branch information
Showing
2 changed files
with
40 additions
and
73 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