X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=inline;f=a1-go%2Fpkg%2Fresthooks%2Fresthooks_test.go;h=98d4f8c2e58f8da236c9b04d87662d1f3c8ad502;hb=refs%2Fchanges%2F50%2F8150%2F2;hp=50a7fe27ebe5a7e443898c257ea52e5bbab15f5e;hpb=6579f78d0b544ffdf9cbf4049eb47a64758f5a71;p=ric-plt%2Fa1.git diff --git a/a1-go/pkg/resthooks/resthooks_test.go b/a1-go/pkg/resthooks/resthooks_test.go index 50a7fe2..98d4f8c 100644 --- a/a1-go/pkg/resthooks/resthooks_test.go +++ b/a1-go/pkg/resthooks/resthooks_test.go @@ -39,6 +39,8 @@ func TestMain(m *testing.M) { sdlInst = new(SdlMock) sdlInst.On("GetAll", "A1m_ns").Return([]string{"a1.policy_instance.1006001.qos", + "a1.policy_instance.20005.123456", + "a1.policy_instance.20005.234567", "a1.policy_type.1006001", "a1.policy_type.20000", "a1.policy_inst_metadata.1006001.qos", @@ -161,6 +163,13 @@ func TestGetPolicyInstance(t *testing.T) { sdlInst.AssertExpectations(t) } +func TestGetAllPolicyIntances(t *testing.T) { + var policyTypeId models.PolicyTypeID + policyTypeId = 20005 + resp := rh.GetAllPolicyInstance(policyTypeId) + assert.Equal(t, 2, len(resp)) +} + type SdlMock struct { mock.Mock }