Make the linters happy
Signed-off-by: Monis Khan <mok@vmware.com>
This commit is contained in:
parent
fd70eda033
commit
8d6a645915
@ -1,3 +1,8 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 VMware, Inc.
|
||||||
|
SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
package integration
|
package integration
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 VMware, Inc.
|
||||||
|
SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
package integration
|
package integration
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@ -7,16 +12,15 @@ import (
|
|||||||
"testing"
|
"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 ./...`
|
// 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"
|
const magicIntegrationTestsEnvVar = "NAME_TEST_INTEGRATION"
|
||||||
|
|
||||||
var shouldRunIntegrationTests bool
|
var shouldRunIntegrationTests = func() bool {
|
||||||
|
b, _ := strconv.ParseBool(os.Getenv(magicIntegrationTestsEnvVar))
|
||||||
func init() {
|
return b
|
||||||
shouldRunIntegrationTests, _ = strconv.ParseBool(os.Getenv(magicIntegrationTestsEnvVar))
|
}()
|
||||||
}
|
|
||||||
|
|
||||||
func TestMain(m *testing.M) {
|
func TestMain(m *testing.M) {
|
||||||
if !shouldRunIntegrationTests {
|
if !shouldRunIntegrationTests {
|
||||||
|
Loading…
Reference in New Issue
Block a user