X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Frtmgr%2Frtmgr_test.go;h=9ffca04c3a4c61fe2b9adca9829db1a3f3415eb2;hb=87c46ef443a44730cfdcab1ba00b25f60825e037;hp=da7d7b85b127abe4ea3a2e6c43c661b8b774d7c8;hpb=aaf8d396257a455247b24716a32b05fc3fd145c2;p=ric-plt%2Frtmgr.git diff --git a/pkg/rtmgr/rtmgr_test.go b/pkg/rtmgr/rtmgr_test.go index da7d7b8..9ffca04 100644 --- a/pkg/rtmgr/rtmgr_test.go +++ b/pkg/rtmgr/rtmgr_test.go @@ -14,6 +14,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + + This source code is part of the near-RT RIC (RAN Intelligent Controller) + platform project (RICP). + ================================================================================== */ /* @@ -28,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") }