From 8d6a64591581c94528acc7eacfd37b91f17c2185 Mon Sep 17 00:00:00 2001 From: Monis Khan Date: Wed, 8 Jul 2020 01:20:34 -0400 Subject: [PATCH] Make the linters happy Signed-off-by: Monis Khan --- test/integration/kubectl_test.go | 5 +++++ test/integration/main_test.go | 18 +++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/test/integration/kubectl_test.go b/test/integration/kubectl_test.go index c8b15b3e..ea664bb8 100644 --- a/test/integration/kubectl_test.go +++ b/test/integration/kubectl_test.go @@ -1,3 +1,8 @@ +/* +Copyright 2020 VMware, Inc. +SPDX-License-Identifier: Apache-2.0 +*/ + package integration import ( diff --git a/test/integration/main_test.go b/test/integration/main_test.go index 75afd53b..a6cde80f 100644 --- a/test/integration/main_test.go +++ b/test/integration/main_test.go @@ -1,3 +1,8 @@ +/* +Copyright 2020 VMware, Inc. +SPDX-License-Identifier: Apache-2.0 +*/ + package integration import ( @@ -7,16 +12,15 @@ import ( "testing" ) -// force users to opt-in to running the integration tests +// force users to opt-in to running the integration tests. // this prevents them from running if someone does `go test ./...` -// these tests could be destructive to the cluster under test +// these tests could be destructive to the cluster under test. const magicIntegrationTestsEnvVar = "NAME_TEST_INTEGRATION" -var shouldRunIntegrationTests bool - -func init() { - shouldRunIntegrationTests, _ = strconv.ParseBool(os.Getenv(magicIntegrationTestsEnvVar)) -} +var shouldRunIntegrationTests = func() bool { + b, _ := strconv.ParseBool(os.Getenv(magicIntegrationTestsEnvVar)) + return b +}() func TestMain(m *testing.M) { if !shouldRunIntegrationTests {