summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4
diff options
context:
space:
mode:
authorPablo Mazzini <pmazzini@gmail.com>2018-08-02 19:37:37 +0200
committerPablo Mazzini <pmazzini@gmail.com>2018-08-02 19:37:37 +0200
commite5d59324bd89596d9a3d88d972936d691d96a96c (patch)
treec7e00b8381272382c2f382b0a75899314e0f3d9c /dhcpv4
parent020d95df3ba020e7ae7753d15cb6ad085cdcf849 (diff)
OptClientArchType: increase coverage
Diffstat (limited to 'dhcpv4')
-rw-r--r--dhcpv4/options_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/dhcpv4/options_test.go b/dhcpv4/options_test.go
index 3121f51..0268483 100644
--- a/dhcpv4/options_test.go
+++ b/dhcpv4/options_test.go
@@ -57,6 +57,14 @@ func TestParseOption(t *testing.T) {
require.Equal(t, 4, opt.Length(), "Length")
require.Equal(t, option, opt.ToBytes(), "ToBytes")
+ // Option NTP servers
+ option = []byte{42, 4, 10, 10, 10, 10}
+ opt, err = ParseOption(option)
+ require.NoError(t, err)
+ require.Equal(t, OptionNTPServers, 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)