diff options
author | Pablo Mazzini <pmazzini@gmail.com> | 2018-11-12 13:08:18 +0000 |
---|---|---|
committer | Pablo Mazzini <pmazzini@gmail.com> | 2018-11-12 13:08:18 +0000 |
commit | f5c1950747619f12256e39e69b9a2a9ec6168d04 (patch) | |
tree | adbc589de1b69bce777aa373bb0fd5a6b570e82a /dhcpv4 | |
parent | 888609097f1aaea108ea2aebcb1d799688505944 (diff) |
OptRelayAgentInformation: increase coverage
Diffstat (limited to 'dhcpv4')
-rw-r--r-- | dhcpv4/option_relay_agent_information_test.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dhcpv4/option_relay_agent_information_test.go b/dhcpv4/option_relay_agent_information_test.go index 9146a24..88cb39a 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 bytes + // short option bytes opt, err := ParseOptRelayAgentInformation([]byte{}) require.Error(t, err) @@ -26,6 +26,10 @@ func TestParseOptRelayAgentInformation(t *testing.T) { opt, err = ParseOptRelayAgentInformation([]byte{82, 3, 1, 0}) require.Error(t, err) + // short sub-option bytes + opt, err = ParseOptRelayAgentInformation([]byte{82, 1, 1}) + require.Error(t, err) + // short sub-option length opt, err = ParseOptRelayAgentInformation([]byte{82, 2, 1, 1}) require.Error(t, err) |