diff options
author | Pablo Mazzini <pmazzini@gmail.com> | 2018-08-02 19:28:14 +0200 |
---|---|---|
committer | Pablo Mazzini <pmazzini@gmail.com> | 2018-08-02 19:28:14 +0200 |
commit | 020d95df3ba020e7ae7753d15cb6ad085cdcf849 (patch) | |
tree | 057afea286e6cb46903de051f3897e5d08eb158b /dhcpv4 | |
parent | 63d7f1ef09968bc3007f26eae4c7a6e1ef4272f6 (diff) |
OptClientArchType: increase coverage
Diffstat (limited to 'dhcpv4')
-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 9d3e88a..3121f51 100644 --- a/dhcpv4/options_test.go +++ b/dhcpv4/options_test.go @@ -49,6 +49,14 @@ func TestParseOption(t *testing.T) { require.Equal(t, 4, opt.Length(), "Length") require.Equal(t, option, opt.ToBytes(), "ToBytes") + // Option domain name + option = []byte{15, 4, 't', 'e', 's', 't'} + opt, err = ParseOption(option) + require.NoError(t, err) + require.Equal(t, OptionDomainName, opt.Code(), "Code") + require.Equal(t, 4, opt.Length(), "Length") + require.Equal(t, option, opt.ToBytes(), "ToBytes") + // Requested IP address option = []byte{50, 4, 1, 2, 3, 4} opt, err = ParseOption(option) |