summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/utils_test.go
diff options
context:
space:
mode:
authorMikoĊ‚aj Walczak <mikiwalczak+github@gmail.com>2018-07-12 10:51:38 +0100
committerinsomniac <insomniacslk@users.noreply.github.com>2018-07-12 10:51:38 +0100
commit8e3bcdab237624421034ccc4eb16f260d4338aec (patch)
tree0cb93b736c59506f68df67ac1150e80047dc202c /dhcpv6/utils_test.go
parent34154e71da6f5b4527809dc0babdefcbd262281c (diff)
Asynchronous client for DHCPv6 (#80)
Diffstat (limited to 'dhcpv6/utils_test.go')
-rw-r--r--dhcpv6/utils_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/dhcpv6/utils_test.go b/dhcpv6/utils_test.go
index 2373691..77205b4 100644
--- a/dhcpv6/utils_test.go
+++ b/dhcpv6/utils_test.go
@@ -49,3 +49,21 @@ func TestIsUsingUEFIUserClassFalse(t *testing.T) {
msg.AddOption(&opt)
require.False(t, IsUsingUEFI(&msg))
}
+
+func TestGetTransactionIDMessage(t *testing.T) {
+ message, err := NewMessage()
+ require.NoError(t, err)
+ transactionID, err := GetTransactionID(message)
+ require.NoError(t, err)
+ require.Equal(t, transactionID, message.(*DHCPv6Message).TransactionID())
+}
+
+func TestGetTransactionIDRelay(t *testing.T) {
+ message, err := NewMessage()
+ require.NoError(t, err)
+ relay, err := EncapsulateRelay(message, RELAY_FORW, nil, nil)
+ require.NoError(t, err)
+ transactionID, err := GetTransactionID(relay)
+ require.NoError(t, err)
+ require.Equal(t, transactionID, message.(*DHCPv6Message).TransactionID())
+}