From 404a7fafff0153d355cd10837f9fc21526eaac2d Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Mon, 29 Feb 2016 14:58:06 -0500 Subject: [PATCH] Don't spawn consul servers when testing unless it's an acceptance test --- builtin/logical/consul/backend_test.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/builtin/logical/consul/backend_test.go b/builtin/logical/consul/backend_test.go index 08c49113f0..1bd6e25047 100644 --- a/builtin/logical/consul/backend_test.go +++ b/builtin/logical/consul/backend_test.go @@ -19,6 +19,10 @@ import ( ) func TestBackend_basic(t *testing.T) { + if os.Getenv("TF_ACC") == "" { + return + } + config, process := testStartConsulServer(t) defer testStopConsulServer(t, process) @@ -35,6 +39,10 @@ func TestBackend_basic(t *testing.T) { } func TestBackend_management(t *testing.T) { + if os.Getenv("TF_ACC") == "" { + return + } + config, process := testStartConsulServer(t) defer testStopConsulServer(t, process) @@ -51,6 +59,10 @@ func TestBackend_management(t *testing.T) { } func TestBackend_crud(t *testing.T) { + if os.Getenv("TF_ACC") == "" { + return + } + _, process := testStartConsulServer(t) defer testStopConsulServer(t, process) @@ -67,6 +79,10 @@ func TestBackend_crud(t *testing.T) { } func TestBackend_role_lease(t *testing.T) { + if os.Getenv("TF_ACC") == "" { + return + } + _, process := testStartConsulServer(t) defer testStopConsulServer(t, process)