Skip to content

Commit

Permalink
add resource error type and message check for ListAll test
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur <[email protected]>
  • Loading branch information
luckyarthur committed Nov 12, 2024
1 parent bd5998e commit 0372f31
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,9 @@ func TestListAllResources(t *testing.T) {
ResourceType: admin.MatchableResource_CLUSTER_RESOURCE,
})
assert.Error(t, resourceError)
var newError errors.FlyteAdminError
assert.ErrorAs(t, resourceError, &newError)
assert.Equal(t, newError.Error(), "resourceError")

db.ResourceRepo().(*mocks.MockResourceRepo).ListAllFunction = func(ctx context.Context, resourceType string) (
[]models.Resource, error) {
Expand Down

0 comments on commit 0372f31

Please sign in to comment.