diff options
Diffstat (limited to 'dhcpv4/dhcpv4_test.go')
-rw-r--r-- | dhcpv4/dhcpv4_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dhcpv4/dhcpv4_test.go b/dhcpv4/dhcpv4_test.go index 8d6ec54..996b481 100644 --- a/dhcpv4/dhcpv4_test.go +++ b/dhcpv4/dhcpv4_test.go @@ -216,13 +216,14 @@ func TestDHCPv4NewRequestFromOffer(t *testing.T) { require.NoError(t, err) offer.SetBroadcast() offer.UpdateOption(OptMessageType(MessageTypeOffer)) - req, err := NewRequestFromOffer(offer) + _, err = NewRequestFromOffer(offer) require.Error(t, err) // Now add the option so it doesn't error out. offer.UpdateOption(OptServerIdentifier(net.IPv4(192, 168, 0, 1))) // Broadcast request + var req *DHCPv4 req, err = NewRequestFromOffer(offer) require.NoError(t, err) require.Equal(t, MessageTypeRequest, req.MessageType()) |