summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/utils_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv6/utils_test.go')
-rw-r--r--dhcpv6/utils_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/dhcpv6/utils_test.go b/dhcpv6/utils_test.go
index f3b53f0..779d55c 100644
--- a/dhcpv6/utils_test.go
+++ b/dhcpv6/utils_test.go
@@ -22,6 +22,17 @@ func TestIsNetboot(t *testing.T) {
require.True(t, IsNetboot(&msg3))
}
+func TestIsRequetsed(t *testing.T) {
+ msg1 := DHCPv6Message{}
+ require.False(t, IsRequested(&msg1, OptionDNSRecursiveNameServer))
+
+ msg2 := DHCPv6Message{}
+ optro := OptRequestedOption{}
+ optro.AddRequestedOption(OptionDNSRecursiveNameServer)
+ msg2.AddOption(&optro)
+ require.True(t, IsRequested(&msg2, OptionDNSRecursiveNameServer))
+}
+
func TestIsUsingUEFIArchTypeTrue(t *testing.T) {
msg := DHCPv6Message{}
opt := OptClientArchType{ArchType: EFI_BC}