From 8bcfa9d3cc5dc36990ac020c613c4bb44fbf5752 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Tue, 17 Jan 2017 14:57:57 -0500 Subject: [PATCH] Do not skip tests when Consul is missing This bit me on CI. The current behavior of the testutil server is to skip if consul isn't present. When lots of output is scrolling by, you're likely to miss the message that the test was skipped. Instead, I propose that we hard fatal if consul doesn't exist, and upstream consumers can skip the tests if they want. --- testutil/server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testutil/server.go b/testutil/server.go index e901217818..7573790aa6 100644 --- a/testutil/server.go +++ b/testutil/server.go @@ -165,7 +165,8 @@ func NewTestServer(t TestingT) *TestServer { // an optional callback function to modify the configuration. func NewTestServerConfig(t TestingT, cb ServerConfigCallback) *TestServer { if path, err := exec.LookPath("consul"); err != nil || path == "" { - t.Skip("consul not found on $PATH, skipping") + t.Fatal("consul not found on $PATH - download and install " + + "consul or skip this test") } dataDir, err := ioutil.TempDir("", "consul")