X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=smoversion%2Finternal%2Fconfig%2Fconfig_test.go;fp=smoversion%2Finternal%2Fconfig%2Fconfig_test.go;h=22a56aa7452b2dc34725ae1ee85b8161e3337e7e;hb=b0650697b9ab538808a5062a0cea691d495aa696;hp=1005946a5e736b5ec3bc8e24461a65eb6d742a18;hpb=41fe0619fe7e9edb9aaa64f522e23ec590906aae;p=nonrtric%2Frapp%2Fransliceassurance.git diff --git a/smoversion/internal/config/config_test.go b/smoversion/internal/config/config_test.go index 1005946..22a56aa 100644 --- a/smoversion/internal/config/config_test.go +++ b/smoversion/internal/config/config_test.go @@ -38,6 +38,7 @@ func TestNewEnvVarsSetConfigContainSetValues(t *testing.T) { os.Setenv("SDNR_PASSWORD", "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U") os.Setenv("Polltime", "30") os.Setenv("LOG_LEVEL", "Debug") + os.Setenv("NODE_ID", "o-du-1122") t.Cleanup(func() { os.Clearenv() }) @@ -49,6 +50,7 @@ func TestNewEnvVarsSetConfigContainSetValues(t *testing.T) { SDNPassword: "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U", Polltime: 30, LogLevel: log.DebugLevel, + NodeId: "o-du-1122", } got := New() @@ -73,6 +75,7 @@ func TestNewFaultyIntValueSetConfigContainDefaultValueAndWarnInLog(t *testing.T) SDNPassword: "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U", Polltime: 30, LogLevel: log.InfoLevel, + NodeId: "", } got := New() @@ -100,6 +103,7 @@ func TestNewEnvFaultyLogLevelConfigContainDefaultValues(t *testing.T) { SDNPassword: "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U", Polltime: 30, LogLevel: log.InfoLevel, + NodeId: "", } got := New() assertions.Equal(&wantConfig, got)