diff options
author | Pablo Mazzini <pmazzini@gmail.com> | 2018-11-11 22:43:47 +0000 |
---|---|---|
committer | Pablo Mazzini <pmazzini@gmail.com> | 2018-11-11 22:43:47 +0000 |
commit | 63b2012572c4572c2f992f6efc911cf105750f7e (patch) | |
tree | 77c6ba2e5037f7c9e6060220e3f8156d881cf27c | |
parent | a71c47f36f5ebcd3397ff66991042e13c3d8b15e (diff) |
OptRelayAgentInformation: increase coverage
-rw-r--r-- | dhcpv4/option_relay_agent_information_test.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dhcpv4/option_relay_agent_information_test.go b/dhcpv4/option_relay_agent_information_test.go index 9e0bfde..f4f46c9 100644 --- a/dhcpv4/option_relay_agent_information_test.go +++ b/dhcpv4/option_relay_agent_information_test.go @@ -13,7 +13,9 @@ func TestParseOptRelayAgentInformation(t *testing.T) { 1, 5, 'l', 'i', 'n', 'u', 'x', 2, 4, 'b', 'o', 'o', 't', } - opt, err := ParseOptRelayAgentInformation(data) + opt, err := ParseOptRelayAgentInformation([]byte("")) + require.Error(t, err) + opt, err = ParseOptRelayAgentInformation(data) require.NoError(t, err) require.Equal(t, len(opt.Options), 2) circuit, ok := opt.Options[0].(*OptionGeneric) |