kubo/util/testutil/ci/jenkins/jenkins_test.go
2015-01-14 15:37:10 -08:00

17 lines
311 B
Go

package jenkins
import (
"os"
"strings"
"testing"
)
func TestIsRunning(t *testing.T) {
hasPrefix := strings.HasPrefix(os.Getenv("BUILD_TAG"), "jenkins-")
tr := len(os.Getenv("JENKINS_URL")) > 0 || hasPrefix
if tr != IsRunning() {
t.Error("IsRunning() does not match TRAVIS && CI env var check")
}
}