t.Log("TEST: Creating REST subscription")
restSubscription := &RESTSubscription{}
+ restSubscription.xAppServiceName = "localhost"
restSubscription.xAppRmrEndPoint = "localhost:13560"
restSubscription.Meid = "RAN_NAME_1"
restSubscription.SubReqOngoing = true
func PrintRESTSubscriptionData(t *testing.T, restSubs *RESTSubscription) {
t.Log("TEST: RESTSubscription data")
+ t.Logf("TEST: restSubs.xAppServiceName = %v", restSubs.xAppServiceName)
t.Logf("TEST: restSubs.xAppRmrEndPoint = %v", restSubs.xAppRmrEndPoint)
t.Logf("TEST: restSubs.Meid = %v", restSubs.Meid)
t.Logf("TEST: restSubs.InstanceIds = %v", restSubs.InstanceIds)
t.Errorf("TEST: %s", err.Error())
}
restSubsDbMock.AddRestSubIdsInDb(restSubId)
+ verifyRESTKeyCount(t, 1)
+}
+
+func verifyRESTKeyCount(t *testing.T, expectedCount int) {
+
+ count, err := mainCtrl.c.GetRESTKeyCount()
+ if err != nil {
+ t.Errorf("TEST: %s", err.Error())
+ } else {
+ assert.Equal(t, expectedCount, count)
+ }
}
func TestReadRESTSubscriptionFromSdl(t *testing.T) {