From 59cfbf4318c7ecf642f211f80a3a211dd5c1b474 Mon Sep 17 00:00:00 2001 From: Hu Jun Date: Fri, 10 Jul 2020 16:09:45 -0700 Subject: - add Offer into Lease - change Client.Request so it now only return Lease - change test case and example accordingly Signed-off-by: Hu Jun --- dhcpv4/server4/server_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dhcpv4/server4/server_test.go') diff --git a/dhcpv4/server4/server_test.go b/dhcpv4/server4/server_test.go index 5e2311f..b3f6d9d 100644 --- a/dhcpv4/server4/server_test.go +++ b/dhcpv4/server4/server_test.go @@ -108,10 +108,10 @@ func TestServer(t *testing.T) { dhcpv4.WithHwAddr(ifaces[0].HardwareAddr), } - offer, lease, err := c.Request(context.Background(), modifiers...) + lease, err := c.Request(context.Background(), modifiers...) require.NoError(t, err) - require.NotNil(t, offer, lease.ACK) - for _, p := range []*dhcpv4.DHCPv4{offer, lease.ACK} { + require.NotNil(t, lease.Offer, lease.ACK) + for _, p := range []*dhcpv4.DHCPv4{lease.Offer, lease.ACK} { require.Equal(t, xid, p.TransactionID) require.Equal(t, ifaces[0].HardwareAddr, p.ClientHWAddr) } -- cgit v1.2.3