diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-01-27 15:37:20 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-01-27 15:37:20 -0800 |
commit | 102a9b893fd7f2747a675989fce20ea0a093ef3b (patch) | |
tree | c025b63a225db77ccd72db84d9fc4e80a7041b4d /pkg/tcpip/network/arp | |
parent | 814cfd7c4a1ab672eb1c0b8a619ba06774300021 (diff) | |
parent | 9ea1a875eb102b2a59b37460d0b78c8e5a9a2b18 (diff) |
Merge pull request #4705 from mlevesquedion:fix-cmp-diff-reporting-in-nud-tests
PiperOrigin-RevId: 354187603
Diffstat (limited to 'pkg/tcpip/network/arp')
-rw-r--r-- | pkg/tcpip/network/arp/arp_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/tcpip/network/arp/arp_test.go b/pkg/tcpip/network/arp/arp_test.go index 001fca727..6b23c0079 100644 --- a/pkg/tcpip/network/arp/arp_test.go +++ b/pkg/tcpip/network/arp/arp_test.go @@ -125,8 +125,8 @@ func (d *arpDispatcher) OnNeighborRemoved(nicID tcpip.NICID, entry stack.Neighbo func (d *arpDispatcher) waitForEvent(ctx context.Context, want eventInfo) error { select { case got := <-d.C: - if diff := cmp.Diff(got, want, cmp.AllowUnexported(got), cmpopts.IgnoreFields(stack.NeighborEntry{}, "UpdatedAtNanos")); diff != "" { - return fmt.Errorf("got invalid event (-got +want):\n%s", diff) + if diff := cmp.Diff(want, got, cmp.AllowUnexported(got), cmpopts.IgnoreFields(stack.NeighborEntry{}, "UpdatedAtNanos")); diff != "" { + return fmt.Errorf("got invalid event (-want +got):\n%s", diff) } case <-ctx.Done(): return fmt.Errorf("%s for %s", ctx.Err(), want) |