X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Frtmgr%2Frtmgr_test.go;h=9ffca04c3a4c61fe2b9adca9829db1a3f3415eb2;hb=refs%2Fchanges%2F94%2F4394%2F1;hp=2f02b994d5f616af4ee99172cfe3fbb5ad69e439;hpb=8f7ca65ce6b2691e08bb3496c14fae88e32ad973;p=ric-plt%2Frtmgr.git diff --git a/pkg/rtmgr/rtmgr_test.go b/pkg/rtmgr/rtmgr_test.go index 2f02b99..9ffca04 100644 --- a/pkg/rtmgr/rtmgr_test.go +++ b/pkg/rtmgr/rtmgr_test.go @@ -32,18 +32,14 @@ import ( "testing" ) -func TestSetLogLevel(t *testing.T) { - modeIsOk := []string{"info", "warn", "debug", "error"} - modeOsNok := []string{"inValId", "LogLEVEL", "Provided"} - for _, value := range modeIsOk { - if SetLogLevel(value) != nil { - t.Error("Invalid log level: " + value) - } - } - - for _, value := range modeOsNok { - if SetLogLevel(value) == nil { - t.Error("Invalid log level: " + value) - } - } +func TestGetPlatformComponents(t *testing.T) { + //Check epty file + _, err := GetPlatformComponents("") + t.Log(err) + + //Valid JSON file + _, err = GetPlatformComponents("/tmp/go/src/routing-manager/manifests/rtmgr/rtmgr-cfg.yaml") + + //Invalid JSON file + _, err = GetPlatformComponents("./pkg/rtmg/rtmgr.go") }