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).
+
==================================================================================
*/
/*
"testing"
)
-func TestSetLogLevel(t *testing.T) {
- modes_ok := []string{"info","warn","debug","error"}
- modes_nok := []string{"inValId","LogLEVEL","PRoviDeD"}
- for _, value := range(modes_ok) {
- if SetLogLevel(value) != nil {
- t.Error("Invalid log level: " + value)
- }
- }
-
- for _, value := range(modes_nok) {
- 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")
+}