diff options
author | Pablo Mazzini <pmazzini@gmail.com> | 2022-10-01 13:29:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-01 13:29:26 +0100 |
commit | 18231451f3d97ab8e78fbad5d7e281af294d38d0 (patch) | |
tree | 7312e2eca94907a60ecd250493c4f36573b57db5 | |
parent | 962b81a3c7c72027180d70695556b03a90a566b5 (diff) | |
parent | 0fe08a6d435ac81833ebee256fe0607a0b1ec9a7 (diff) |
Merge pull request #479 from twelho/fix-not-nil-checks
dhcpv4: fix require.NotNil() usage in tests
-rw-r--r-- | dhcpv4/server4/server_test.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dhcpv4/server4/server_test.go b/dhcpv4/server4/server_test.go index b0336db..9fc44a3 100644 --- a/dhcpv4/server4/server_test.go +++ b/dhcpv4/server4/server_test.go @@ -110,7 +110,8 @@ func TestServer(t *testing.T) { lease, err := c.Request(context.Background(), modifiers...) require.NoError(t, err) - require.NotNil(t, lease.Offer, lease.ACK) + require.NotNil(t, lease.Offer) + require.NotNil(t, 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) @@ -118,7 +119,8 @@ func TestServer(t *testing.T) { lease, err = c.Renew(context.Background(), lease, modifiers...) require.NoError(t, err) - require.NotNil(t, lease.Offer, lease.ACK) + require.NotNil(t, lease.Offer) + require.NotNil(t, 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) |