pkg/gates: add unit test for String

Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
pull/7608/head
Zhou Hao 4 years ago
parent 5ecf3fc099
commit 03b04639f3

@ -45,3 +45,12 @@ func TestError(t *testing.T) {
t.Errorf("incorrect error message. Received %s", g.Error().Error())
}
}
func TestString(t *testing.T) {
os.Unsetenv(name)
g := Gate(name)
if g.String() != "HELM_EXPERIMENTAL_FEATURE" {
t.Errorf("incorrect string representation. Received %s", g.String())
}
}

Loading…
Cancel
Save