summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4
diff options
context:
space:
mode:
authorHu Jun <hujun.work@gmail.com>2020-06-27 11:34:38 -0700
committerHu Jun <hujun.work@gmail.com>2020-06-27 11:36:33 -0700
commit1d36507b4f6275378782e305dfe1839491306ace (patch)
tree0af338a5b979279fd07464fba9ce9e61d1726646 /dhcpv4
parentb418fa564662be29be64d464e045e353500ceb3e (diff)
fix a broken test in server_test.go, caused by update of Client.Request() which now returns a lease instead of ack
Signed-off-by: Hu Jun <hujun.work@gmail.com>
Diffstat (limited to 'dhcpv4')
-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 43314ad..5e2311f 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, ack, err := c.Request(context.Background(), modifiers...)
+ offer, lease, err := c.Request(context.Background(), modifiers...)
require.NoError(t, err)
- require.NotNil(t, offer, ack)
- for _, p := range []*dhcpv4.DHCPv4{offer, ack} {
+ require.NotNil(t, offer, lease.ACK)
+ for _, p := range []*dhcpv4.DHCPv4{offer, lease.ACK} {
require.Equal(t, xid, p.TransactionID)
require.Equal(t, ifaces[0].HardwareAddr, p.ClientHWAddr)
}