From be2d47cceb3f1732cfc76f2e0896675bcedeb6b7 Mon Sep 17 00:00:00 2001 From: anjali9791 Date: Mon, 26 Aug 2024 11:58:27 +0530 Subject: [PATCH] test(appeal): add fix for failing test case (#176) fix: add fix for failing test case Co-authored-by: anjali.agarwal --- core/appeal/service_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/appeal/service_test.go b/core/appeal/service_test.go index d602127d..12f4dc53 100644 --- a/core/appeal/service_test.go +++ b/core/appeal/service_test.go @@ -2069,7 +2069,13 @@ func (s *ServiceTestSuite) TestCreate() { h.mockProviderService.EXPECT(). GetPermissions(mock.Anything, mock.Anything, mock.AnythingOfType("string"), "role_id"). Return([]interface{}{"test-permission-1"}, nil) + h.mockIAMManager.EXPECT(). + ParseConfig(mock.Anything).Return(nil, nil) + h.mockIAMManager.EXPECT(). + GetClient(mock.Anything).Return(h.mockIAMClient, nil) + h.mockIAMClient.EXPECT(). + GetUser(accountID).Return(nil, errors.New("404 not found")).Once() actualError := h.service.Create(context.Background(), appeals) s.NotNil(actualError) time.Sleep(time.Millisecond)