diff --git a/tests/e2e/kubetest2-kops/deployer/down.go b/tests/e2e/kubetest2-kops/deployer/down.go index d74f4bdd7f0b0..ca9f48b5fa008 100644 --- a/tests/e2e/kubetest2-kops/deployer/down.go +++ b/tests/e2e/kubetest2-kops/deployer/down.go @@ -33,7 +33,7 @@ func (d *deployer) Down() error { } // There is no point running the rest of this function if the cluster doesn't exist - cluster, _ := kops.GetCluster(d.KopsBinaryPath, d.ClusterName, nil) + cluster, _ := kops.GetCluster(d.KopsBinaryPath, d.ClusterName, nil, false) if cluster == nil { return nil } diff --git a/tests/e2e/pkg/kops/state.go b/tests/e2e/pkg/kops/state.go index e5b14fb115ebe..0b3ddd12b5c1f 100644 --- a/tests/e2e/pkg/kops/state.go +++ b/tests/e2e/pkg/kops/state.go @@ -29,9 +29,12 @@ import ( ) // GetCluster will retrieve the specified Cluster from the state store. -func GetCluster(kopsBinary, clusterName string, env []string) (*api.Cluster, error) { +func GetCluster(kopsBinary, clusterName string, env []string, full bool) (*api.Cluster, error) { args := []string{ - kopsBinary, "get", "cluster", clusterName, "-ojson", "--full", + kopsBinary, "get", "cluster", clusterName, "-ojson", + } + if full { + args = append(args, "--full") } c := exec.Command(args[0], args[1:]...) c.SetEnv(env...) diff --git a/tests/e2e/pkg/tester/tester.go b/tests/e2e/pkg/tester/tester.go index 88ac260a8786d..111d1b1be0142 100644 --- a/tests/e2e/pkg/tester/tester.go +++ b/tests/e2e/pkg/tester/tester.go @@ -107,7 +107,7 @@ func (t *Tester) getKopsCluster() (*api.Cluster, error) { kopsClusterName := currentContext - cluster, err := kops.GetCluster("kops", kopsClusterName, nil) + cluster, err := kops.GetCluster("kops", kopsClusterName, nil, true) if err != nil { return nil, err }