diff options
author | Chris Koch <chrisko@google.com> | 2019-12-28 06:30:10 -0800 |
---|---|---|
committer | Chris K <c@chrisko.ch> | 2020-01-02 06:40:00 -0700 |
commit | 9a95b101e205d121810f3922999e1af1d39e4c43 (patch) | |
tree | a8e7787a32f68ba96ecea1eb1b9402bd8cfe86f6 /dhcpv6/option_nontemporaryaddress_test.go | |
parent | b3fbc9f9fdd5ac725d73f2a9109e59d4947f067d (diff) |
v6: use time.Duration for duration fields
Signed-off-by: Chris Koch <chrisko@google.com>
Diffstat (limited to 'dhcpv6/option_nontemporaryaddress_test.go')
-rw-r--r-- | dhcpv6/option_nontemporaryaddress_test.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/dhcpv6/option_nontemporaryaddress_test.go b/dhcpv6/option_nontemporaryaddress_test.go index afe6917..6ad5f97 100644 --- a/dhcpv6/option_nontemporaryaddress_test.go +++ b/dhcpv6/option_nontemporaryaddress_test.go @@ -3,6 +3,7 @@ package dhcpv6 import ( "net" "testing" + "time" "github.com/stretchr/testify/require" ) @@ -89,8 +90,8 @@ func TestOptIANADelOption(t *testing.T) { func TestOptIANAToBytes(t *testing.T) { opt := OptIANA{ IaId: [4]byte{1, 2, 3, 4}, - T1: 12345, - T2: 54321, + T1: 12345 * time.Second, + T2: 54321 * time.Second, Options: []Option{ &OptElapsedTime{ ElapsedTime: 0xaabb, @@ -124,7 +125,7 @@ func TestOptIANAString(t *testing.T) { ) require.Contains( t, str, - "t1=1, t2=2", + "t1=1s, t2=2s", "String() should return the T1/T2 options", ) require.Contains( |