From 0372f319ca9f20156cf761f94182ae8318326444 Mon Sep 17 00:00:00 2001 From: Arthur Date: Tue, 12 Nov 2024 16:59:16 +0800 Subject: [PATCH] add resource error type and message check for ListAll test Signed-off-by: Arthur --- flyteadmin/pkg/manager/impl/resources/resource_manager_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flyteadmin/pkg/manager/impl/resources/resource_manager_test.go b/flyteadmin/pkg/manager/impl/resources/resource_manager_test.go index 66c8259850..0537ef4a85 100644 --- a/flyteadmin/pkg/manager/impl/resources/resource_manager_test.go +++ b/flyteadmin/pkg/manager/impl/resources/resource_manager_test.go @@ -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) {