From 5eebf02e5f05b92a9fc52decff3e0ebea19f0011 Mon Sep 17 00:00:00 2001 From: Ivan Kozlovic Date: Mon, 9 Mar 2020 10:13:32 -0600 Subject: [PATCH] Fixed TestVersionMatchesTag test When no tag was set, os.Getenv("TRAVIS_TAG") would return empty string. Travis now set TRAVIS_TAG to `''`. So check for both. Signed-off-by: Ivan Kozlovic --- server/server_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/server_test.go b/server/server_test.go index a7bc6e91..f3acee5f 100644 --- a/server/server_test.go +++ b/server/server_test.go @@ -104,7 +104,8 @@ func RunServerWithConfig(configFile string) (srv *Server, opts *Options) { func TestVersionMatchesTag(t *testing.T) { tag := os.Getenv("TRAVIS_TAG") - if tag == "" { + // Travis started to return '' when no tag is set. Support both now. + if tag == "" || tag == "''" { t.SkipNow() } // We expect a tag of the form vX.Y.Z. If that's not the case,