mirror of
https://github.com/helm/helm.git
synced 2026-05-28 04:35:48 -04:00
add unittest for SetNamespace method
Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
parent
d376a67ba8
commit
0d3289eb0b
1 changed files with 14 additions and 0 deletions
|
|
@ -25,6 +25,20 @@ import (
|
|||
"github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
func TestSetNamespace(t *testing.T) {
|
||||
settings := New()
|
||||
|
||||
if settings.namespace != "" {
|
||||
t.Errorf("Expected empty namespace, got %s", settings.namespace)
|
||||
}
|
||||
|
||||
settings.SetNamespace("testns")
|
||||
if settings.namespace != "testns" {
|
||||
t.Errorf("Expected namespace testns, got %s", settings.namespace)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestEnvSettings(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
|
|
|
|||
Loading…
Reference in a new issue