diff --git a/p2p/net/swarm/dial_test.go b/p2p/net/swarm/dial_test.go index d0e0cdbb0e4..7a850e1ce59 100644 --- a/p2p/net/swarm/dial_test.go +++ b/p2p/net/swarm/dial_test.go @@ -151,7 +151,7 @@ func TestDialWait(t *testing.T) { func TestDialBackoff(t *testing.T) { // t.Skip("skipping for another test") if ci.IsRunning() { - t.Skip("travis and jenkins will never have fun with this test") + t.Skip("travis will never have fun with this test") } t.Parallel() diff --git a/test/jenkins/network-test.sh b/test/jenkins/network-test.sh deleted file mode 100755 index 8905284bd32..00000000000 --- a/test/jenkins/network-test.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -export GOPATH=$WORKSPACE - -PWD=`pwd` -cd ../3nodetest -make clean -make test -make save_logs - -docker cp 3nodetest_server_1:/root/.ipfs/logs/events.log $(PWD)/build/server-events.log -docker cp 3nodetest_bootstrap_1:/root/.ipfs/logs/events.log $(PWD)/build/bootstrap-events.log -docker cp 3nodetest_client_1:/root/.ipfs/logs/events.log $(PWD)/build/client-events.log diff --git a/util/testutil/ci/ci.go b/util/testutil/ci/ci.go index df5e87b8d93..45b0b7767a8 100644 --- a/util/testutil/ci/ci.go +++ b/util/testutil/ci/ci.go @@ -6,7 +6,6 @@ package ci import ( "os" - jenkins "github.com/ipfs/go-ipfs/util/testutil/ci/jenkins" travis "github.com/ipfs/go-ipfs/util/testutil/ci/travis" ) @@ -26,14 +25,9 @@ const ( // // CI=true // travis.IsRunning() -// jenkins.IsRunning() // func IsRunning() bool { - if os.Getenv(string(VarCI)) == "true" { - return true - } - - return travis.IsRunning() || jenkins.IsRunning() + return os.Getenv(string(VarCI)) == "true" || travis.IsRunning() } // Env returns the value of a CI env variable. diff --git a/util/testutil/ci/jenkins/jenkins.go b/util/testutil/ci/jenkins/jenkins.go deleted file mode 100644 index 5bea2168178..00000000000 --- a/util/testutil/ci/jenkins/jenkins.go +++ /dev/null @@ -1,58 +0,0 @@ -// Package jenkins implements some helper functions to use during -// tests. Many times certain facilities are not available, or tests -// must run differently. -package jenkins - -import ( - "os" - "strings" -) - -// EnvVar is a type to use travis-only env var names with -// the type system. -type EnvVar string - -// Environment variables that Jenkins uses. -const ( - VarBuildNumber EnvVar = "BUILD_NUMBER" - VarBuildId EnvVar = "BUILD_ID" - VarBuildUrl EnvVar = "BUILD_URL" - VarNodeName EnvVar = "NODE_NAME" - VarJobName EnvVar = "JOB_NAME" - VarBuildTag EnvVar = "BUILD_TAG" - VarJenkinsUrl EnvVar = "JENKINS_URL" - VarExecutorNumber EnvVar = "EXECUTOR_NUMBER" - VarJavaHome EnvVar = "JAVA_HOME" - VarWorkspace EnvVar = "WORKSPACE" - VarSvnRevision EnvVar = "SVN_REVISION" - VarCvsBranch EnvVar = "CVS_BRANCH" - VarGitCommit EnvVar = "GIT_COMMIT" - VarGitUrl EnvVar = "GIT_URL" - VarGitBranch EnvVar = "GIT_BRANCH" -) - -// IsRunning attempts to determine whether this process is -// running on Jenkins CI. This is done by checking any of the -// following: -// -// JENKINS_URL is set -// BuildTag has prefix "jenkins-" -// -func IsRunning() bool { - return len(Env(VarJenkinsUrl)) > 0 || strings.HasPrefix(Env(VarBuildTag), "jenkins-") -} - -// Env returns the value of a travis env variable. -func Env(v EnvVar) string { - return os.Getenv(string(v)) -} - -// JobName returns the jenkins JOB_NAME of this build. -func JobName() string { - return Env(VarJobName) -} - -// BuildTag returns the jenkins BUILD_TAG. -func BuildTag() string { - return Env(VarBuildTag) -} diff --git a/util/testutil/ci/jenkins/jenkins_test.go b/util/testutil/ci/jenkins/jenkins_test.go deleted file mode 100644 index d37cdf6a5ab..00000000000 --- a/util/testutil/ci/jenkins/jenkins_test.go +++ /dev/null @@ -1,16 +0,0 @@ -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") - } -}