mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-01 14:28:02 +08:00
17 lines
311 B
Go
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")
|
|
}
|
|
}
|