diff options
author | Pablo Mazzini <pmazzini@gmail.com> | 2018-08-02 18:58:47 +0200 |
---|---|---|
committer | Pablo Mazzini <pmazzini@gmail.com> | 2018-08-02 19:11:56 +0200 |
commit | 54efe77e5afa90329d78cf8302b8eb8e0af3e898 (patch) | |
tree | 3665d640adeb4e499e68ca88db5b93f44b6859b9 /dhcpv4 | |
parent | 93881b9caf158750b4d98e3ab10413bbe28fee02 (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 be2791c..b2d671a 100644 --- a/dhcpv4/options_test.go +++ b/dhcpv4/options_test.go @@ -33,6 +33,14 @@ func TestParseOption(t *testing.T) { require.Equal(t, 4, opt.Length(), "Length") require.Equal(t, option, opt.ToBytes(), "ToBytes") + // Option domain name server + option = []byte{6, 4, 192, 168, 1, 1} + opt, err = ParseOption(option) + require.NoError(t, err) + require.Equal(t, OptionDomainNameServer, 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) |