summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMarcel Moolenaar <mmoolena@amazon.com>2021-02-24 13:54:06 -0800
committerChris K <c@chrisko.ch>2021-03-06 14:40:58 -0800
commit018caddcb1ebc9c36a656d0186e4c28ec6af8a33 (patch)
tree2374149146321ad81da2a8fb0296ac4f7553327a
parent62c5e6a9631be9fe5122f4a43f937e99df1c208f (diff)
Fix tests to match the change packet
Signed-off-by: Marcel Moolenaar <mmoolena@amazon.com>
-rw-r--r--dhcpv4/dhcpv4_test.go8
-rw-r--r--dhcpv6/option_dhcpv4_msg_test.go8
2 files changed, 8 insertions, 8 deletions
diff --git a/dhcpv4/dhcpv4_test.go b/dhcpv4/dhcpv4_test.go
index 6bbee31..fe7855e 100644
--- a/dhcpv4/dhcpv4_test.go
+++ b/dhcpv4/dhcpv4_test.go
@@ -165,14 +165,14 @@ func TestNewToBytes(t *testing.T) {
// Magic Cookie
expected = append(expected, magicCookie[:]...)
+ // End
+ expected = append(expected, 0xff)
+
// Minimum message length padding.
//
- // 236 + 4 byte cookie + 59 bytes padding + 1 byte end.
+ // 236 + 4 byte cookie + 1 byte end + 59 bytes padding.
expected = append(expected, bytes.Repeat([]byte{0}, 59)...)
- // End
- expected = append(expected, 0xff)
-
d, err := New()
require.NoError(t, err)
// fix TransactionID to match the expected one, since it's randomly
diff --git a/dhcpv6/option_dhcpv4_msg_test.go b/dhcpv6/option_dhcpv4_msg_test.go
index 1ffa17a..d8d3f6d 100644
--- a/dhcpv6/option_dhcpv4_msg_test.go
+++ b/dhcpv6/option_dhcpv4_msg_test.go
@@ -87,14 +87,14 @@ func TestOptDHCPv4MsgToBytes(t *testing.T) {
// Magic Cookie
expected = append(expected, magicCookie[:]...)
+ // End
+ expected = append(expected, 0xff)
+
// Minimum message length padding.
//
- // 236 + 4 byte cookie + 59 bytes padding + 1 byte end.
+ // 236 + 4 byte cookie + 1 byte end + 59 bytes padding.
expected = append(expected, bytes.Repeat([]byte{0}, 59)...)
- // End
- expected = append(expected, 0xff)
-
d, err := dhcpv4.New()
require.NoError(t, err)
// fix TransactionID to match the expected one, since it's randomly