diff options
author | Pablo Mazzini <pmazzini@gmail.com> | 2018-09-12 19:40:16 +0100 |
---|---|---|
committer | Pablo Mazzini <pmazzini@gmail.com> | 2018-09-12 19:40:16 +0100 |
commit | 49117fb0f83872ea94c8f5c778f48dc15fb56d4b (patch) | |
tree | 3c2bbf58bb2dd7621e0d0c8c9dc6061d676bc4c0 /dhcpv6/dhcpv6_test.go | |
parent | a1d809f9af5f6e4d5aae6522b5dc9d9a16812465 (diff) |
NewReplyFromDHCPv6Message: reply to information request
Diffstat (limited to 'dhcpv6/dhcpv6_test.go')
-rw-r--r-- | dhcpv6/dhcpv6_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/dhcpv6/dhcpv6_test.go b/dhcpv6/dhcpv6_test.go index 6840252..0b7c895 100644 --- a/dhcpv6/dhcpv6_test.go +++ b/dhcpv6/dhcpv6_test.go @@ -174,6 +174,12 @@ func TestNewReplyFromDHCPv6Message(t *testing.T) { require.Equal(t, rep.(*DHCPv6Message).TransactionID(), msg.TransactionID()) require.Equal(t, rep.Type(), MessageTypeReply) + msg.SetMessage(MessageTypeInformationRequest) + rep, err = NewReplyFromDHCPv6Message(&msg, WithServerID(duid)) + require.NoError(t, err) + require.Equal(t, rep.(*DHCPv6Message).TransactionID(), msg.TransactionID()) + require.Equal(t, rep.Type(), MessageTypeReply) + msg.SetMessage(MessageTypeSolicit) rep, err = NewReplyFromDHCPv6Message(&msg) require.Error(t, err) |