X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=cmd%2Fappmgr%2Fhelm_test.go;fp=cmd%2Fappmgr%2Fhelm_test.go;h=b3ff3487f507442e31497231bba776bfba09705c;hb=d732b871ab1dccaf9ef5311dede522879193b45e;hp=c3ac3c5c8fa29e6a506d8f581d002fc7def20e28;hpb=8492ba318dfe939c74a22a6303144b66c7ab4923;p=ric-plt%2Fappmgr.git diff --git a/cmd/appmgr/helm_test.go b/cmd/appmgr/helm_test.go index c3ac3c5..b3ff348 100755 --- a/cmd/appmgr/helm_test.go +++ b/cmd/appmgr/helm_test.go @@ -99,16 +99,6 @@ func TestHelmLists(t *testing.T) { } } -func TestHelmNamespace(t *testing.T) { - if getNamespace("pltxapp") != "pltxapp" { - t.Errorf("getNamespace failed!") - } - - if getNamespace("") != "ricxapp" { - t.Errorf("getNamespace failed!") - } -} - func TestAddTillerEnv(t *testing.T) { if addTillerEnv() != nil { t.Errorf("TestAddTillerEnv failed!") @@ -116,7 +106,7 @@ func TestAddTillerEnv(t *testing.T) { } func TestGetInstallArgs(t *testing.T) { - x := XappDeploy{Name: "dummy-xapp"} + x := XappDeploy{Name: "dummy-xapp", Namespace: "ricxapp"} expectedArgs := "install helm-repo/dummy-xapp --name=dummy-xapp --namespace=ricxapp" if args := getInstallArgs(x, false); args != expectedArgs { @@ -124,19 +114,19 @@ func TestGetInstallArgs(t *testing.T) { } x.ImageRepo = "localhost:5000" - expectedArgs = expectedArgs + " --set image.repository=" + "localhost:5000" + expectedArgs = expectedArgs + " --set global.repository=" + "localhost:5000" if args := getInstallArgs(x, false); args != expectedArgs { t.Errorf("TestGetInstallArgs failed: expected %v, got %v", expectedArgs, args) } x.ServiceName = "xapp" - expectedArgs = expectedArgs + " --set service.name=" + "xapp" + expectedArgs = expectedArgs + " --set ricapp.service.name=" + "xapp" if args := getInstallArgs(x, false); args != expectedArgs { t.Errorf("TestGetInstallArgs failed: expected %v, got %v", expectedArgs, args) } x.ServiceName = "xapp" - expectedArgs = expectedArgs + " --set appconfig.override=true" + expectedArgs = expectedArgs + " --set ricapp.appconfig.override=dummy-xapp-appconfig" if args := getInstallArgs(x, true); args != expectedArgs { t.Errorf("TestGetInstallArgs failed: expected %v, got %v", expectedArgs, args) }