diff options
author | Pablo Mazzini <pmazzini@gmail.com> | 2018-11-11 21:28:37 +0000 |
---|---|---|
committer | Pablo Mazzini <pmazzini@gmail.com> | 2018-11-11 21:28:37 +0000 |
commit | 1d591269d345af65c9f1c2c3a9d6b1c8ea327cb2 (patch) | |
tree | 94f04d740ccc3c287ae10ee886a5533a78864c02 | |
parent | 0bdc80968e801d1b72062d3481129c84f3788627 (diff) |
OptRelayAgentInformation: increase coverage
-rw-r--r-- | dhcpv4/options_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dhcpv4/options_test.go b/dhcpv4/options_test.go index 258fcfd..a4bf6d7 100644 --- a/dhcpv4/options_test.go +++ b/dhcpv4/options_test.go @@ -79,6 +79,14 @@ func TestParseOption(t *testing.T) { require.Equal(t, 4, opt.Length(), "Length") require.Equal(t, option, opt.ToBytes(), "ToBytes") + // Requested IP address lease time + option = []byte{51, 4, 0, 0, 0, 0} + opt, err = ParseOption(option) + require.NoError(t, err) + require.Equal(t, OptionIPAddressLeaseTime, opt.Code(), "Code") + require.Equal(t, 4, opt.Length(), "Length") + require.Equal(t, option, opt.ToBytes(), "ToBytes") + // Message type option = []byte{53, 1, 1} opt, err = ParseOption(option) |