TestCreateCleanWithPrefix was failing if env variables existed

pull/6/head
Anastasis Andronidis 2015-06-18 23:24:23 +02:00
parent b758be0daf
commit 530369cc01
1 changed files with 4 additions and 1 deletions

View File

@ -162,9 +162,12 @@ func TestCreateCleanWithPrefix(t *testing.T) {
{"anything.com:8080", "anything.com:8080", ""},
{"anything.com", "anything.com", ""},
{"anything", "anything", ""},
{"", "http://localhost:8080", ""},
}
// WARNING: EnvVarCluster.Server is set during package loading time and can not be overriden by os.Setenv inside this test
EnvVarCluster.Server = ""
tt = append(tt, struct{ server, host, prefix string }{"", "http://localhost:8080", ""})
for _, tc := range tt {
config := createValidTestConfig()