Skip to content

Commit 0372f31

Browse files
committed
add resource error type and message check for ListAll test
Signed-off-by: Arthur <Arthur2Geek@proton.me>
1 parent bd5998e commit 0372f31

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

flyteadmin/pkg/manager/impl/resources/resource_manager_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,9 @@ func TestListAllResources(t *testing.T) {
969969
ResourceType: admin.MatchableResource_CLUSTER_RESOURCE,
970970
})
971971
assert.Error(t, resourceError)
972+
var newError errors.FlyteAdminError
973+
assert.ErrorAs(t, resourceError, &newError)
974+
assert.Equal(t, newError.Error(), "resourceError")
972975

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

0 commit comments

Comments
 (0)