summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/option_bootfileurl_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv6/option_bootfileurl_test.go')
-rw-r--r--dhcpv6/option_bootfileurl_test.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/dhcpv6/option_bootfileurl_test.go b/dhcpv6/option_bootfileurl_test.go
index f93dc47..97d3163 100644
--- a/dhcpv6/option_bootfileurl_test.go
+++ b/dhcpv6/option_bootfileurl_test.go
@@ -24,13 +24,11 @@ func TestOptBootFileURL(t *testing.T) {
func TestOptBootFileURLToBytes(t *testing.T) {
urlString := []byte("https://insomniac.slackware.it")
- expected := []byte{00, 59, 00, byte(len(urlString))}
- expected = append(expected, urlString...)
opt := OptBootFileURL{
BootFileURL: urlString,
}
toBytes := opt.ToBytes()
- if !bytes.Equal(toBytes, expected) {
- t.Fatalf("Invalid ToBytes result. Expected %v, got %v", expected, toBytes)
+ if !bytes.Equal(toBytes, urlString) {
+ t.Fatalf("Invalid ToBytes result. Expected %v, got %v", urlString, toBytes)
}
}