X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=a1-go%2Fpkg%2Fresthooks%2Fresthooks_test.go;h=cfad2705d82efd2259d521f9f4b02fcf81b0ef49;hb=6017d6adfa0908db09c0a2d65d05f238b2e945b2;hp=db4a04cf9c539b6a18983d1be0b32f12e053b475;hpb=f8e5619649c0fb2ddfc466b970e8338a45e55cb8;p=ric-plt%2Fa1.git diff --git a/a1-go/pkg/resthooks/resthooks_test.go b/a1-go/pkg/resthooks/resthooks_test.go index db4a04c..cfad270 100644 --- a/a1-go/pkg/resthooks/resthooks_test.go +++ b/a1-go/pkg/resthooks/resthooks_test.go @@ -33,6 +33,13 @@ var sdlInst *SdlMock func TestMain(m *testing.M) { sdlInst = new(SdlMock) + + sdlInst.On("GetAll", "A1m_ns").Return([]string{"a1.policy_instance.1006001.qos", + "a1.policy_type.1006001", + "a1.policy_type.20000", + "a1.policy_inst_metadata.1006001.qos", + }, nil) + rh = createResthook(sdlInst) code := m.Run() os.Exit(code) @@ -48,9 +55,6 @@ type SdlMock struct { } func (s *SdlMock) GetAll(ns string) ([]string, error) { - return []string{"a1.policy_instance.1006001.qos", - "a1.policy_type.1006001", - "a1.policy_type.20000", - "a1.policy_inst_metadata.1006001.qos", - }, nil + args := s.MethodCalled("GetAll", ns) + return args.Get(0).([]string), nil }