summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4
diff options
context:
space:
mode:
authorPablo Mazzini <pmazzini@gmail.com>2018-11-12 12:49:34 +0000
committerPablo Mazzini <pmazzini@gmail.com>2018-11-12 12:49:34 +0000
commit42c46b5a6c407e515ca948fe5643e1258f80b280 (patch)
tree227ea3705c6f658a4e33d86fca7201338a9a2a68 /dhcpv4
parent41291f85fc29a1d53e6e4d478e82fc1de39ee832 (diff)
OptRelayAgentInformation: increase coverage
Diffstat (limited to 'dhcpv4')
-rw-r--r--dhcpv4/option_relay_agent_information_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/dhcpv4/option_relay_agent_information_test.go b/dhcpv4/option_relay_agent_information_test.go
index 28b4ca9..3395271 100644
--- a/dhcpv4/option_relay_agent_information_test.go
+++ b/dhcpv4/option_relay_agent_information_test.go
@@ -14,7 +14,7 @@ func TestParseOptRelayAgentInformation(t *testing.T) {
2, 4, 'b', 'o', 'o', 't',
}
- // short option bytes
+ // short bytes
opt, err := ParseOptRelayAgentInformation([]byte{})
require.Error(t, err)
@@ -22,12 +22,12 @@ func TestParseOptRelayAgentInformation(t *testing.T) {
opt, err = ParseOptRelayAgentInformation([]byte{1, 2, 1, 0})
require.Error(t, err)
- // wrong length
+ // wrong option length
opt, err = ParseOptRelayAgentInformation([]byte{82, 3, 1, 0})
require.Error(t, err)
- // short sub-option bytes
- opt, err = ParseOptRelayAgentInformation([]byte{82, 2, 1})
+ // short sub-option length
+ opt, err = ParseOptRelayAgentInformation([]byte{82, 2, 2, 0})
require.Error(t, err)
opt, err = ParseOptRelayAgentInformation(data)