diff options
Diffstat (limited to 'dhcpv4/dhcpv4_test.go')
-rw-r--r-- | dhcpv4/dhcpv4_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dhcpv4/dhcpv4_test.go b/dhcpv4/dhcpv4_test.go index 1bce05d..6e3394c 100644 --- a/dhcpv4/dhcpv4_test.go +++ b/dhcpv4/dhcpv4_test.go @@ -342,24 +342,24 @@ func TestAddOption(t *testing.T) { require.Equal(t, options[3].Code(), OptionEnd) } -func TestDHCPv4RequestFromOffer(t *testing.T) { +func TestDHCPv4NewRequestFromOffer(t *testing.T) { offer, err := New() require.NoError(t, err) offer.AddOption(&OptMessageType{MessageType: MessageTypeOffer}) offer.AddOption(&OptServerIdentifier{ServerID: net.IPv4(192, 168, 0, 1)}) - req, err := RequestFromOffer(*offer) + req, err := NewRequestFromOffer(offer) require.NoError(t, err) require.NotEqual(t, (*MessageType)(nil), *req.MessageType()) require.Equal(t, MessageTypeRequest, *req.MessageType()) } -func TestDHCPv4RequestFromOfferWithModifier(t *testing.T) { +func TestDHCPv4NewRequestFromOfferWithModifier(t *testing.T) { offer, err := New() require.NoError(t, err) offer.AddOption(&OptMessageType{MessageType: MessageTypeOffer}) offer.AddOption(&OptServerIdentifier{ServerID: net.IPv4(192, 168, 0, 1)}) userClass := WithUserClass([]byte("linuxboot"), false) - req, err := RequestFromOffer(*offer, userClass) + req, err := NewRequestFromOffer(offer, userClass) require.NoError(t, err) require.NotEqual(t, (*MessageType)(nil), *req.MessageType()) require.Equal(t, MessageTypeRequest, *req.MessageType()) |