Skip to content

Commit

Permalink
fact(network_routes_controller_test.go): use better error condition h…
Browse files Browse the repository at this point in the history
…andling
  • Loading branch information
aauren committed Sep 22, 2024
1 parent 57731f2 commit f6ff559
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/controllers/routing/network_routes_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package routing

import (
"context"
"errors"
"fmt"
"net"
"os"
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit f6ff559

Please sign in to comment.