fix various bad tests
This commit is contained in:

committed by
Jeff Grafton

parent
59fc948a06
commit
e48a4f0af7
4
pkg/util/env/env_test.go
vendored
4
pkg/util/env/env_test.go
vendored
@@ -55,7 +55,9 @@ func TestGetEnvAsIntOrFallback(t *testing.T) {
|
||||
os.Setenv(key, "not-an-int")
|
||||
returnVal, err := GetEnvAsIntOrFallback(key, 1)
|
||||
assert.Equal(expected, returnVal)
|
||||
assert.EqualError(err, "strconv.ParseInt: parsing \"not-an-int\": invalid syntax")
|
||||
if err == nil {
|
||||
t.Error("expected error")
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetEnvAsFloat64OrFallback(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user