diff --git a/tests/e2e/kubetest2-kops/deployer/deployer.go b/tests/e2e/kubetest2-kops/deployer/deployer.go index a79bf96965..170301ed9f 100644 --- a/tests/e2e/kubetest2-kops/deployer/deployer.go +++ b/tests/e2e/kubetest2-kops/deployer/deployer.go @@ -20,6 +20,7 @@ package deployer import ( "flag" "sync" + "time" "github.com/octago/sflags/gen/gpflag" "github.com/spf13/pflag" @@ -55,6 +56,8 @@ type deployer struct { KopsBinaryPath string `flag:"kops-binary-path" desc:"The path to kops executable used for testing"` StateStore string `flag:"-"` + ValidationWait time.Duration `flag:"validation-wait" desc:"time to wait for newly created cluster to pass validation"` + TemplatePath string `flag:"template-path" desc:"The path to the manifest template used for cluster creation"` KubernetesVersion string `flag:"kubernetes-version" desc:"The kubernetes version to use in the cluster"` diff --git a/tests/e2e/kubetest2-kops/deployer/up.go b/tests/e2e/kubetest2-kops/deployer/up.go index 5cece387ff..ae599a5e36 100644 --- a/tests/e2e/kubetest2-kops/deployer/up.go +++ b/tests/e2e/kubetest2-kops/deployer/up.go @@ -147,17 +147,21 @@ func (d *deployer) createCluster(zones []string, adminAccess string) error { } func (d *deployer) IsUp() (bool, error) { - wait := "15m" - if d.TerraformVersion != "" { - // `--target terraform` doesn't precreate the API DNS records, - // so kops is more likely to hit negative TTLs during validation - wait = "20m" + wait := d.ValidationWait + if wait == 0 { + if d.TerraformVersion != "" { + // `--target terraform` doesn't precreate the API DNS records, + // so kops is more likely to hit negative TTLs during validation + wait = time.Duration(20) * time.Minute + } else { + wait = time.Duration(15) * time.Minute + } } args := []string{ d.KopsBinaryPath, "validate", "cluster", "--name", d.ClusterName, "--count", "10", - "--wait", wait, + "--wait", wait.String(), } klog.Info(strings.Join(args, " "))