Code Review
/
ric-plt
/
submgr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
RIC-937: Go mod version update 1.17 -> 1.18
[ric-plt/submgr.git]
/
pkg
/
control
/
sdl_restSubsDb_test.go
diff --git
a/pkg/control/sdl_restSubsDb_test.go
b/pkg/control/sdl_restSubsDb_test.go
index
273a15e
..
5e1db60
100644
(file)
--- a/
pkg/control/sdl_restSubsDb_test.go
+++ b/
pkg/control/sdl_restSubsDb_test.go
@@
-89,6
+89,7
@@
func CreateRESTSubscription(t *testing.T) *RESTSubscription {
t.Log("TEST: Creating REST subscription")
restSubscription := &RESTSubscription{}
t.Log("TEST: Creating REST subscription")
restSubscription := &RESTSubscription{}
+ restSubscription.xAppServiceName = "localhost"
restSubscription.xAppRmrEndPoint = "localhost:13560"
restSubscription.Meid = "RAN_NAME_1"
restSubscription.SubReqOngoing = true
restSubscription.xAppRmrEndPoint = "localhost:13560"
restSubscription.Meid = "RAN_NAME_1"
restSubscription.SubReqOngoing = true
@@
-100,6
+101,7
@@
func CreateRESTSubscription(t *testing.T) *RESTSubscription {
func PrintRESTSubscriptionData(t *testing.T, restSubs *RESTSubscription) {
t.Log("TEST: RESTSubscription data")
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.Logf("TEST: restSubs.xAppRmrEndPoint = %v", restSubs.xAppRmrEndPoint)
t.Logf("TEST: restSubs.Meid = %v", restSubs.Meid)
t.Logf("TEST: restSubs.InstanceIds = %v", restSubs.InstanceIds)
@@
-120,6
+122,17
@@
func TestWriteRESTSubscriptionToSdl(t *testing.T) {
t.Errorf("TEST: %s", err.Error())
}
restSubsDbMock.AddRestSubIdsInDb(restSubId)
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) {
}
func TestReadRESTSubscriptionFromSdl(t *testing.T) {