diff --git a/pkg/controllers/routing/network_routes_controller_test.go b/pkg/controllers/routing/network_routes_controller_test.go index acd72aad2..316c0b6b2 100644 --- a/pkg/controllers/routing/network_routes_controller_test.go +++ b/pkg/controllers/routing/network_routes_controller_test.go @@ -2,6 +2,7 @@ package routing import ( "context" + "errors" "fmt" "net" "os" @@ -1893,7 +1894,7 @@ func Test_nodeHasEndpointsForService(t *testing.T) { waitForListerWithTimeout(testcase.nrc.epLister, time.Second*10, t) nodeHasEndpoints, err := testcase.nrc.nodeHasEndpointsForService(testcase.existingService) - if !reflect.DeepEqual(err, testcase.err) { + if !errors.Is(err, testcase.err) { t.Logf("actual err: %v", err) t.Logf("expected err: %v", testcase.err) t.Error("unexpected error")