summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/server4/server_test.go
diff options
context:
space:
mode:
authorHu Jun <hujun.work@gmail.com>2020-07-10 16:09:45 -0700
committerHu Jun <hujun.work@gmail.com>2020-07-10 16:09:45 -0700
commit59cfbf4318c7ecf642f211f80a3a211dd5c1b474 (patch)
tree598a7b857057aaade5c3fcc58d99004b906df2d2 /dhcpv4/server4/server_test.go
parent265274d9f25ea0a42b849f6b94e91b858dc6bc83 (diff)
- add Offer into Lease
- change Client.Request so it now only return Lease - change test case and example accordingly Signed-off-by: Hu Jun <hujun.work@gmail.com>
Diffstat (limited to 'dhcpv4/server4/server_test.go')
-rw-r--r--dhcpv4/server4/server_test.go6
1 files changed, 3 insertions, 3 deletions
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)
}