X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fnbi%2Fhttpgetter_test.go;h=9d4f4eccd9adb0f1c551438be8a25cf7a6807dd0;hb=refs%2Fchanges%2F06%2F6306%2F1;hp=5c7082a6f23c6eb26be98934506de3ef80ef37c4;hpb=aaf8d396257a455247b24716a32b05fc3fd145c2;p=ric-plt%2Frtmgr.git diff --git a/pkg/nbi/httpgetter_test.go b/pkg/nbi/httpgetter_test.go index 5c7082a..9d4f4ec 100644 --- a/pkg/nbi/httpgetter_test.go +++ b/pkg/nbi/httpgetter_test.go @@ -14,6 +14,11 @@ 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,12 +33,17 @@ import ( "net" "net/http" "net/http/httptest" - "routing-manager/pkg/rtmgr" "testing" + "routing-manager/pkg/sbi" + "routing-manager/pkg/sdl" + "routing-manager/pkg/rpe" + "fmt" + "sync" ) var ( XMURL = "http://127.0.0.1:3000/ric/v1/xapps" + E2MURL = "http://127.0.0.1:8085/ric/v1/e2t/list" ) func TestFetchXappListInvalidData(t *testing.T) { @@ -46,7 +56,6 @@ func TestFetchXappListInvalidData(t *testing.T) { func TestFetchXappListWithInvalidData(t *testing.T) { var expected = 0 - rtmgr.SetLogLevel("debug") b := []byte(`{"ID":"deadbeef1234567890", "Version":0, "EventType":"all"}`) l, err := net.Listen("tcp", "127.0.0.1:3000") if err != nil { @@ -125,3 +134,21 @@ func TestFetchAllXAppsWithValidData(t *testing.T) { } } } + +func TestHttpInstance1(t *testing.T) { + sdlEngine, _ := sdl.GetSdl("file") + rpeEngine, _ := rpe.GetRpe("rmrpush") + sbiEngine, _ := sbi.GetSbi("rmrpush") + httpinstance := NewHttpGetter() + err := httpinstance.Terminate() + t.Log(err) + fmt.Printf("sbiEngine = %v", sbiEngine) + + createMockPlatformComponents() + //ts := createMockAppmgrWithData("127.0.0.1:3000", BasicXAppLists, nil) + //ts.Start() + //defer ts.Close() + var m sync.Mutex + err = httpinstance.Initialize(XMURL, "httpgetter", "rt.json", "config.json", E2MURL, sdlEngine, rpeEngine, &m) +} +