summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/bsdp/bsdp_option_generic_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv4/bsdp/bsdp_option_generic_test.go')
-rw-r--r--dhcpv4/bsdp/bsdp_option_generic_test.go10
1 files changed, 1 insertions, 9 deletions
diff --git a/dhcpv4/bsdp/bsdp_option_generic_test.go b/dhcpv4/bsdp/bsdp_option_generic_test.go
index 27436dd..eae77e1 100644
--- a/dhcpv4/bsdp/bsdp_option_generic_test.go
+++ b/dhcpv4/bsdp/bsdp_option_generic_test.go
@@ -7,19 +7,11 @@ import (
)
func TestParseOptGeneric(t *testing.T) {
- // Empty bytestream produces error
- _, err := ParseOptGeneric([]byte{})
- require.Error(t, err, "error from empty bytestream")
-
// Good parse
- o, err := ParseOptGeneric([]byte{1, 1, 1})
+ o, err := ParseOptGeneric(OptionMessageType, []byte{1})
require.NoError(t, err)
require.Equal(t, OptionMessageType, o.Code())
require.Equal(t, MessageTypeList, MessageType(o.Data[0]))
-
- // Bad parse
- o, err = ParseOptGeneric([]byte{1, 2, 1})
- require.Error(t, err, "invalid length")
}
func TestOptGenericCode(t *testing.T) {