X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fcontrol%2Fut_messaging_test.go;h=d20b8726361911dab6ff3f2e095577b8098e00ab;hb=fa39fedbbd1c2e6bfea4b952184936f393ff2690;hp=891437f265733ca8d25a0dc21c398d5f6383d837;hpb=39d94ea1dd0e04ee6da8742d133393ce6ed3200c;p=ric-plt%2Fsubmgr.git diff --git a/pkg/control/ut_messaging_test.go b/pkg/control/ut_messaging_test.go index 891437f..d20b872 100644 --- a/pkg/control/ut_messaging_test.go +++ b/pkg/control/ut_messaging_test.go @@ -24,11 +24,28 @@ import ( "time" "gerrit.o-ran-sc.org/r/ric-plt/e2ap/pkg/e2ap" + "gerrit.o-ran-sc.org/r/ric-plt/e2ap/pkg/e2ap_wrapper" "gerrit.o-ran-sc.org/r/ric-plt/submgr/pkg/teststube2ap" "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp" "github.com/stretchr/testify/assert" ) +func TestRESTSubReqAndDeleteOkWithE2apUtWrapper(t *testing.T) { + + // The effect of this call shall endure thgough the UT suite! + // If this causes any issues, the previout interface can be restored + // like this: + // SetPackerIf(e2ap_wrapper.NewAsn1E2APPacker()) + + SetPackerIf(e2ap_wrapper.NewUtAsn1E2APPacker()) + + restSubId, e2SubsId := createSubscription(t, xappConn1, e2termConn1, nil) + + deleteSubscription(t, xappConn1, e2termConn1, &restSubId) + + waitSubsCleanup(t, e2SubsId, 10) +} + //----------------------------------------------------------------------------- // TestSubReqAndRouteNok // @@ -4167,8 +4184,10 @@ func TestRESTSubReqAndSubDelOkSameActionWithRestartsInMiddle(t *testing.T) { // mainCtrl.SimulateRestart(t) // xapp.Logger.Debug("mainCtrl.SimulateRestart done") - // Delete subscription 1 + // Delete subscription 1, and wait until it has removed the first endpoint + subepcnt := mainCtrl.get_subs_entrypoint_cnt(t, e2SubsId1) xappConn1.SendRESTSubsDelReq(t, &restSubId1) + mainCtrl.wait_subs_entrypoint_cnt_change(t, e2SubsId1, subepcnt, 10) // When SDL support for the REST Interface is added // the submgr restart statement below should be removed @@ -4176,7 +4195,6 @@ func TestRESTSubReqAndSubDelOkSameActionWithRestartsInMiddle(t *testing.T) { // mainCtrl.SimulateRestart(t) // xapp.Logger.Debug("mainCtrl.SimulateRestart done") - queryXappSubscription(t, int64(e2SubsId1), "RAN_NAME_1", []string{"localhost:13660"}) // Delete subscription 2 @@ -4435,7 +4453,6 @@ func TestRESTTwoReportSubReqAndSubDelOk(t *testing.T) { mainCtrl.VerifyCounterValues(t) } -/* func TestRESTTwoReportSubReqAndSubDelOkNoActParams(t *testing.T) { subReqCount := 2 @@ -4471,8 +4488,7 @@ func TestRESTTwoReportSubReqAndSubDelOkNoActParams(t *testing.T) { mainCtrl.VerifyCounterValues(t) } -*/ -/* + func TestRESTFullAmountReportSubReqAndSubDelOk(t *testing.T) { subReqCount := 19 @@ -4508,7 +4524,6 @@ func TestRESTFullAmountReportSubReqAndSubDelOk(t *testing.T) { mainCtrl.VerifyCounterValues(t) } -*/ func TestRESTSubReqReportSameActionDiffEventTriggerDefinitionLen(t *testing.T) { CaseBegin("TestRESTSubReqReportSameActionDiffEventTriggerDefinitionLen")