diff options
Diffstat (limited to 'dhcpv4/bsdp/bsdp_option_machine_name_test.go')
-rw-r--r-- | dhcpv4/bsdp/bsdp_option_machine_name_test.go | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/dhcpv4/bsdp/bsdp_option_machine_name_test.go b/dhcpv4/bsdp/bsdp_option_machine_name_test.go index 9019020..712bc49 100644 --- a/dhcpv4/bsdp/bsdp_option_machine_name_test.go +++ b/dhcpv4/bsdp/bsdp_option_machine_name_test.go @@ -15,25 +15,10 @@ func TestOptMachineNameInterfaceMethods(t *testing.T) { } func TestParseOptMachineName(t *testing.T) { - data := []byte{130, 7, 's', 'o', 'm', 'e', 'b', 'o', 'x'} + data := []byte{'s', 'o', 'm', 'e', 'b', 'o', 'x'} o, err := ParseOptMachineName(data) require.NoError(t, err) require.Equal(t, &OptMachineName{"somebox"}, o) - - // Short byte stream - data = []byte{130} - _, err = ParseOptMachineName(data) - require.Error(t, err, "should get error from short byte stream") - - // Wrong code - data = []byte{54, 1, 1} - _, err = ParseOptMachineName(data) - require.Error(t, err, "should get error from wrong code") - - // Bad length - data = []byte{130, 5, 1} - _, err = ParseOptMachineName(data) - require.Error(t, err, "should get error from bad length") } func TestOptMachineNameString(t *testing.T) { |