diff --git a/.travis.yml b/.travis.yml index c8bcec473..9a88a87a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ go: - 1.8 env: - - CONSUL_VERSION=0.7.5 + - CONSUL_VERSION=0.7.5 TF_CONSUL_TEST=1 # Fetch consul for the backend and provider tests before_install: diff --git a/backend/remote-state/consul/backend_test.go b/backend/remote-state/consul/backend_test.go index 819e790d7..6a8566e0c 100644 --- a/backend/remote-state/consul/backend_test.go +++ b/backend/remote-state/consul/backend_test.go @@ -3,6 +3,7 @@ package consul import ( "fmt" "io/ioutil" + "os" "testing" "time" @@ -15,6 +16,12 @@ func TestBackend_impl(t *testing.T) { } func newConsulTestServer(t *testing.T) *testutil.TestServer { + skip := os.Getenv("TF_ACC") == "" && os.Getenv("TF_CONSUL_TEST") == "" + if skip { + t.Log("consul server tests require setting TF_ACC or TF_CONSUL_TEST") + t.Skip() + } + srv := testutil.NewTestServerConfig(t, func(c *testutil.TestServerConfig) { c.LogLevel = "warn"