summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4
diff options
context:
space:
mode:
authorPablo Mazzini <pmazzini@gmail.com>2018-08-02 17:53:59 +0200
committerPablo Mazzini <pmazzini@gmail.com>2018-08-02 19:11:56 +0200
commit93881b9caf158750b4d98e3ab10413bbe28fee02 (patch)
tree0e14572451cba1d359e3e83f8c6163e6d6c291b0 /dhcpv4
parent3a192e93923b2ce2fcb4046994d058e557259ced (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 73b344b..be2791c 100644
--- a/dhcpv4/options_test.go
+++ b/dhcpv4/options_test.go
@@ -25,6 +25,14 @@ func TestParseOption(t *testing.T) {
require.Equal(t, 4, opt.Length(), "Length")
require.Equal(t, option, opt.ToBytes(), "ToBytes")
+ // Option router
+ option = []byte{3, 4, 192, 168, 1, 1}
+ opt, err = ParseOption(option)
+ require.NoError(t, err)
+ require.Equal(t, OptionRouter, 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)