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 <ivan@synadia.com>
This commit is contained in:
Ivan Kozlovic
2020-03-09 10:13:32 -06:00
parent cbc0e5848a
commit 5eebf02e5f

View File

@@ -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,