-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve kubectl utility in e2e tests (#394)
* Rename kubectl.KubectlBuilder to kubectl.Builder Signed-off-by: Marko Lukša <mluksa@redhat.com> * Remove unnecessary function newBuilder() Signed-off-by: Marko Lukša <mluksa@redhat.com> * Remove unnecessary function setBinary() Signed-off-by: Marko Lukša <mluksa@redhat.com> * Refactor to remove the need for ResetNamespace() By passing around Builder by value instead of by reference, we ensure that the functions SetNamespace()/SetKubeconfig/SetBinary() never modify the existing Builder and instead create a new copy and set the namespace/kubeconfig/binary there. This allows us to re-use the same builder in multiple places without having to call ResetNamespace() after calling SetNamespace(). Signed-off-by: Marko Lukša <mluksa@redhat.com> * Rename SetNamespace/SetBinary/SetKubeconfig to WithNamespace/WithBinary/WithKubeconfig Signed-off-by: Marko Lukša <mluksa@redhat.com> * Rename kubectl.Builder to kubectl.Kubectl Signed-off-by: Marko Lukša <mluksa@redhat.com> * Rename containerflag() to containerFlag() Signed-off-by: Marko Lukša <mluksa@redhat.com> * Remove DefaultBinary const Signed-off-by: Marko Lukša <mluksa@redhat.com> * Rename kubectlClient1/2 to k1/k2 Signed-off-by: Marko Lukša <mluksa@redhat.com> * Fix whitespace Signed-off-by: Marko Lukša <mluksa@redhat.com> * Fix test Signed-off-by: Marko Lukša <mluksa@redhat.com> * Fix PushIntermediateCA() Signed-off-by: Marko Lukša <mluksa@redhat.com> * A few micro improvements Signed-off-by: Marko Lukša <mluksa@redhat.com> --------- Signed-off-by: Marko Lukša <mluksa@redhat.com>
- Loading branch information
Showing
11 changed files
with
153 additions
and
176 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
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.