From ae019935b3f4e7418e4fbc6666f28a6b72c03204 Mon Sep 17 00:00:00 2001 From: Jeff Grafton Date: Tue, 28 Apr 2015 14:57:56 -0700 Subject: [PATCH] Call the cluster/kubectl.sh wrapper in e2e tests. The ginkgo wrapper script used to set up the path so that tests would find the appropriate kubectl binary, but this seems like a cleaner way to achieve the same result. --- test/e2e/util.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/e2e/util.go b/test/e2e/util.go index 19543611ff..198b89ff7d 100644 --- a/test/e2e/util.go +++ b/test/e2e/util.go @@ -300,8 +300,7 @@ func validateController(c *client.Client, containerImage string, replicas int, c Failf("Timed out after %v seconds waiting for %s pods to reach valid state", podStartTimeout.Seconds(), testname) } -// kubectlCmd runs the kubectl executable. -// kubectlCmd runs the kubectl executable. +// kubectlCmd runs the kubectl executable through the helper script. func kubectlCmd(args ...string) *exec.Cmd { defaultArgs := []string{} @@ -329,7 +328,7 @@ func kubectlCmd(args ...string) *exec.Cmd { kubectlArgs := append(defaultArgs, args...) //TODO: the "kubectl" path string might be worth externalizing into an (optional) ginko arg. - cmd := exec.Command("kubectl", kubectlArgs...) + cmd := exec.Command(filepath.Join(testContext.RepoRoot, "cluster/kubectl.sh"), kubectlArgs...) Logf("Running '%s %s'", cmd.Path, strings.Join(cmd.Args, " ")) return cmd }