X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fcontrol%2Fsdl_restSubsDb_test.go;fp=pkg%2Fcontrol%2Fsdl_restSubsDb_test.go;h=3db8a2d94e7f8061581e967f4534b77023ddb356;hb=afadb6df033657afef927964aa637ba7c8fc0880;hp=273a15e1fb5053b70e6ddd346cb31662b8213893;hpb=989d584ada9e40aa97848700bd26c9b7af72b91d;p=ric-plt%2Fsubmgr.git diff --git a/pkg/control/sdl_restSubsDb_test.go b/pkg/control/sdl_restSubsDb_test.go index 273a15e..3db8a2d 100644 --- a/pkg/control/sdl_restSubsDb_test.go +++ b/pkg/control/sdl_restSubsDb_test.go @@ -120,6 +120,17 @@ func TestWriteRESTSubscriptionToSdl(t *testing.T) { 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) {