X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fteststube2ap%2FstubE2.go;h=bcc6aae4e23b47fa07a09ea7e297e651722c86c5;hb=37f85a0157751a7e34e03f766d356ce890bad838;hp=56043937510a5b8b437daa096489982337d70bf1;hpb=39d94ea1dd0e04ee6da8742d133393ce6ed3200c;p=ric-plt%2Fsubmgr.git diff --git a/pkg/teststube2ap/stubE2.go b/pkg/teststube2ap/stubE2.go index 5604393..bcc6aae 100644 --- a/pkg/teststube2ap/stubE2.go +++ b/pkg/teststube2ap/stubE2.go @@ -631,7 +631,11 @@ func (tc *E2Stub) SendSubsDelFail(t *testing.T, req *e2ap.E2APSubscriptionDelete // Callback handler for subscription response notifications //----------------------------------------------------------------------------- func (tc *E2Stub) SubscriptionRespHandler(resp *clientmodel.SubscriptionResponse) { - if tc.subscriptionId == *resp.SubscriptionID { + if tc.subscriptionId == "SUBSCRIPTIONID NOT SET" { + tc.Info("REST notification received for %v while no SubscriptionID was not set for InstanceID=%v, RequestorID=%v (%v)", + *resp.SubscriptionID, *resp.SubscriptionInstances[0].InstanceID, *resp.SubscriptionInstances[0].RequestorID, tc) + tc.CallBackNotification <- *resp.SubscriptionInstances[0].InstanceID + } else if tc.subscriptionId == *resp.SubscriptionID { tc.Info("REST notification received SubscriptionID=%s, InstanceID=%v, RequestorID=%v (%v)", *resp.SubscriptionID, *resp.SubscriptionInstances[0].InstanceID, *resp.SubscriptionInstances[0].RequestorID, tc) tc.CallBackNotification <- *resp.SubscriptionInstances[0].InstanceID @@ -771,6 +775,8 @@ func (tc *E2Stub) SendRESTSubsReq(t *testing.T, params *RESTSubsReqParams) strin return "" } + tc.subscriptionId = "SUBSCIPTIONID NOT SET" + resp, err := xapp.Subscription.Subscribe(¶ms.SubsReqParams) if err != nil { // Swagger generated code makes checks for the values that are inserted the subscription function