diff options
author | Ghanan Gowripalan <ghanan@google.com> | 2020-11-23 22:45:42 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-11-23 22:47:55 -0800 |
commit | ba2d5cb7e1f3ac69a65d0e790f1319082ee01de2 (patch) | |
tree | 8bace42d0e2ee03d4f62178e811ab49b40caf76e /pkg/tcpip/checker/checker.go | |
parent | d4951e05a00a9ec84b8065311836aa9c844f63f6 (diff) |
Use time.Duration for IGMP Max Response Time field
Bug #4682
PiperOrigin-RevId: 343993297
Diffstat (limited to 'pkg/tcpip/checker/checker.go')
-rw-r--r-- | pkg/tcpip/checker/checker.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/tcpip/checker/checker.go b/pkg/tcpip/checker/checker.go index 1c82c2c3b..13bb5a723 100644 --- a/pkg/tcpip/checker/checker.go +++ b/pkg/tcpip/checker/checker.go @@ -20,6 +20,7 @@ import ( "encoding/binary" "reflect" "testing" + "time" "github.com/google/go-cmp/cmp" "gvisor.dev/gvisor/pkg/tcpip" @@ -1267,7 +1268,7 @@ func IGMPType(want header.IGMPType) TransportChecker { } // IGMPMaxRespTime creates a checker that checks the IGMP Max Resp Time field. -func IGMPMaxRespTime(want byte) TransportChecker { +func IGMPMaxRespTime(want time.Duration) TransportChecker { return func(t *testing.T, h header.Transport) { t.Helper() @@ -1276,7 +1277,7 @@ func IGMPMaxRespTime(want byte) TransportChecker { t.Fatalf("got transport header = %T, want = header.IGMP", h) } if got := igmp.MaxRespTime(); got != want { - t.Errorf("got igmp.MaxRespTime() = %d, want = %d", got, want) + t.Errorf("got igmp.MaxRespTime() = %s, want = %s", got, want) } } } |