X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fnbi%2Fhttpgetter_test.go;h=9d4f4eccd9adb0f1c551438be8a25cf7a6807dd0;hb=930db799fe886da7b2c80f89ed3f67c0433c4ed7;hp=0080a843b5dfcc3699718f8ce72a74cbe1787e22;hpb=cb93dbf2fac19dd49332847327b364be27d8bb71;p=ric-plt%2Frtmgr.git diff --git a/pkg/nbi/httpgetter_test.go b/pkg/nbi/httpgetter_test.go index 0080a84..9d4f4ec 100644 --- a/pkg/nbi/httpgetter_test.go +++ b/pkg/nbi/httpgetter_test.go @@ -34,11 +34,16 @@ import ( "net/http" "net/http/httptest" "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:8080/ric/v1/e2t/list" + E2MURL = "http://127.0.0.1:8085/ric/v1/e2t/list" ) func TestFetchXappListInvalidData(t *testing.T) { @@ -129,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) +} +