From d12ba1eb96bb602a3f16b0334450969da87ea379 Mon Sep 17 00:00:00 2001 From: fabriziopandini Date: Mon, 26 Apr 2021 23:08:02 +0200 Subject: [PATCH] fix linter --- test/e2e/clusterctl_upgrade.go | 13 ++++++------- test/framework/clusterctl/client.go | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/test/e2e/clusterctl_upgrade.go b/test/e2e/clusterctl_upgrade.go index 784dbb789f9d..238bb6a34bec 100644 --- a/test/e2e/clusterctl_upgrade.go +++ b/test/e2e/clusterctl_upgrade.go @@ -85,7 +85,6 @@ func ClusterctlUpgradeSpec(ctx context.Context, inputGetter func() ClusterctlUpg }) It("Should create a management cluster and then upgrade all the providers", func() { - By("Creating a workload cluster to be used as a new management cluster") // NOTE: given that the bootstrap cluster could be shared by several tests, it is not practical to use it for testing clusterctl upgrades. // So we are creating a workload cluster that will be used as a new management cluster where to install older version of providers @@ -127,15 +126,15 @@ func ClusterctlUpgradeSpec(ctx context.Context, inputGetter func() ClusterctlUpg // Get a ClusterBroker so we can interact with the workload cluster managementClusterProxy = input.BootstrapClusterProxy.GetWorkloadCluster(context.TODO(), cluster.Namespace, cluster.Name) - var binaryUrl string + var binaryURL string if input.E2EConfig.HasVariable("INIT_WITH_BINARY") { - binaryUrl = input.E2EConfig.GetVariable("INIT_WITH_BINARY") - binaryUrl = strings.ReplaceAll(binaryUrl, "{OS}", runtime.GOOS) - binaryUrl = strings.ReplaceAll(binaryUrl, "{ARCH}", runtime.GOARCH) + binaryURL = input.E2EConfig.GetVariable("INIT_WITH_BINARY") + binaryURL = strings.ReplaceAll(binaryURL, "{OS}", runtime.GOOS) + binaryURL = strings.ReplaceAll(binaryURL, "{ARCH}", runtime.GOARCH) } - log.Logf("downloading clusterctl binary from %s", binaryUrl) - binaryFile := downloadToTmpFile(binaryUrl) + log.Logf("downloading clusterctl binary from %s", binaryURL) + binaryFile := downloadToTmpFile(binaryURL) defer os.Remove(binaryFile) // clean up err := os.Chmod(binaryFile, 0744) diff --git a/test/framework/clusterctl/client.go b/test/framework/clusterctl/client.go index 7cd5d43573cc..5c3f6686607f 100644 --- a/test/framework/clusterctl/client.go +++ b/test/framework/clusterctl/client.go @@ -85,7 +85,7 @@ func Init(ctx context.Context, input InitInput) { Expect(err).ToNot(HaveOccurred(), "failed to run clusterctl init") } -// InitWithBinary uses clusterctl binary to run init with the list of providers defined in the local repository +// InitWithBinary uses clusterctl binary to run init with the list of providers defined in the local repository. func InitWithBinary(_ context.Context, binary string, input InitInput) { log.Logf("clusterctl init --core %s --bootstrap %s --control-plane %s --infrastructure %s", input.CoreProvider, @@ -117,7 +117,7 @@ type UpgradeInput struct { Contract string } -// Upgrade calls clusterctl upgrade apply with the list of providers defined in the local repository +// Upgrade calls clusterctl upgrade apply with the list of providers defined in the local repository. func Upgrade(ctx context.Context, input UpgradeInput) { log.Logf("clusterctl upgrade apply --management-group %s --contract %s", input.ManagementGroup,