From ed241d6f92c48cdeeaef80e0fda116c50b0dcd50 Mon Sep 17 00:00:00 2001 From: Michalis Kargakis Date: Mon, 4 Jun 2018 19:11:52 +0200 Subject: [PATCH] Get kubeconfig in e2e as early as possible (#3152) --- test/e2e/runner/cli_provisioner.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/e2e/runner/cli_provisioner.go b/test/e2e/runner/cli_provisioner.go index f55fc76850..b67de03974 100644 --- a/test/e2e/runner/cli_provisioner.go +++ b/test/e2e/runner/cli_provisioner.go @@ -148,6 +148,12 @@ func (cli *CLIProvisioner) provision() error { } cli.Engine.ExpandedDefinition = csGenerated + // Both Openshift and Kubernetes deployments should have a kubeconfig available + // at this point. + if (cli.Config.IsKubernetes() || cli.Config.IsOpenShift()) && !cli.IsPrivate() { + cli.Config.SetKubeConfig() + } + // Lets start by just using the normal az group deployment cli for creating a cluster err = cli.Account.CreateDeployment(cli.Config.Name, eng) if err != nil { @@ -184,7 +190,6 @@ func (cli *CLIProvisioner) generateName() string { func (cli *CLIProvisioner) waitForNodes() error { if cli.Config.IsKubernetes() || cli.Config.IsOpenShift() { if !cli.IsPrivate() { - cli.Config.SetKubeConfig() log.Println("Waiting on nodes to go into ready state...") ready := node.WaitOnReady(cli.Engine.NodeCount(), 10*time.Second, cli.Config.Timeout) if !ready {