From 13172b43ddd7288e1161abd580277d86d6ff7ab0 Mon Sep 17 00:00:00 2001 From: Lifosmin Simon Date: Tue, 12 Sep 2023 14:09:50 +0700 Subject: [PATCH] fix: testing --- api/handler/v1beta1/grant_test.go | 1 + internal/store/postgres/grant_repository_test.go | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/api/handler/v1beta1/grant_test.go b/api/handler/v1beta1/grant_test.go index 0185cdeeb..4fc291fa5 100644 --- a/api/handler/v1beta1/grant_test.go +++ b/api/handler/v1beta1/grant_test.go @@ -281,6 +281,7 @@ func (s *GrpcHandlersSuite) TestListUserRoles() { s.Nil(err) // Check that there are no errors. s.grantService.AssertExpectations(s.T()) s.Equal(expectedResponse.Roles, res.Roles) + s.Equal(codes.OK, status.Code(err)) }) s.Run("should return unauthenticated user", func() { diff --git a/internal/store/postgres/grant_repository_test.go b/internal/store/postgres/grant_repository_test.go index 04fba66d0..dd949240b 100644 --- a/internal/store/postgres/grant_repository_test.go +++ b/internal/store/postgres/grant_repository_test.go @@ -135,12 +135,6 @@ func (s *GrantRepositoryTestSuite) TestListUserRoles() { s.Equal(actualResult, expectedRoles) s.Nil(actualError) }) - - s.Run("should return err", func() { - _, actualError := s.repository.ListUserRoles(context.Background(), "user") - - s.Nil(actualError) - }) } func (s *GrantRepositoryTestSuite) TestList() {