Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6.x - Fix integTest target by honoring TEST_ENVIRONMENT #9737

Merged
merged 1 commit into from
Dec 21, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions dev-tools/mage/integtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ func StopIntegTestEnv() error {
return nil
}

if _, skip := skipIntegTest(); skip {
return nil
}

composeEnv, err := integTestDockerComposeEnvVars()
if err != nil {
return err
Expand Down Expand Up @@ -241,6 +245,10 @@ func haveIntegTestEnvRequirements() error {

// skipIntegTest returns true if integ tests should be skipped.
func skipIntegTest() (reason string, skip bool) {
if IsInIntegTestEnv() {
return "", false
}

// Honor the TEST_ENVIRONMENT value if set.
if testEnvVar, isSet := os.LookupEnv("TEST_ENVIRONMENT"); isSet {
enabled, err := strconv.ParseBool(testEnvVar)
Expand Down