diff options
Diffstat (limited to 'dhcpv6/option_relaymsg_test.go')
-rw-r--r-- | dhcpv6/option_relaymsg_test.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/dhcpv6/option_relaymsg_test.go b/dhcpv6/option_relaymsg_test.go index e77a6c6..0b8e399 100644 --- a/dhcpv6/option_relaymsg_test.go +++ b/dhcpv6/option_relaymsg_test.go @@ -9,7 +9,8 @@ import ( ) func TestRelayMsgParseOptRelayMsg(t *testing.T) { - opt, err := parseOptRelayMsg([]byte{ + var opt optRelayMsg + err := opt.FromBytes([]byte{ 1, // MessageTypeSolicit 0xaa, 0xbb, 0xcc, // transaction ID 0, 8, // option: elapsed time @@ -148,7 +149,8 @@ func TestSample(t *testing.T) { } func TestRelayMsgParseOptRelayMsgTooShort(t *testing.T) { - _, err := parseOptRelayMsg([]byte{ + var opt optRelayMsg + err := opt.FromBytes([]byte{ 1, // MessageTypeSolicit 0xaa, 0xbb, 0xcc, // transaction ID 0, 8, // option: elapsed time @@ -158,7 +160,8 @@ func TestRelayMsgParseOptRelayMsgTooShort(t *testing.T) { } func TestRelayMsgString(t *testing.T) { - opt, err := parseOptRelayMsg([]byte{ + var opt optRelayMsg + err := opt.FromBytes([]byte{ 1, // MessageTypeSolicit 0xaa, 0xbb, 0xcc, // transaction ID 0, 8, // option: elapsed time |