]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
update with notes for the test that is still failing
authorAlan T. DeKok <aland@freeradius.org>
Thu, 27 Nov 2025 20:53:10 +0000 (15:53 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 27 Nov 2025 21:03:29 +0000 (16:03 -0500)
src/tests/process/dhcpv6/Request

index 13cda4d907d12df6a6c587b7626bbef2c3e96121..a1942c4b99c1b6df2ca7f40d5d15e8be0a6071c1 100644 (file)
@@ -40,17 +40,48 @@ subrequest @DHCPv6::Request {
 #
 #  Disabled at present pending UNION data types
 #
-#              # ... Server-ID must be inside reply
-#              if (!reply.Server-ID.DUID.LLT.Hardware-Type) {
-#                      test_fail
-#              }
-
-#              if (!reply.Server-ID.DUID.LLT.Time) {
-#                      test_fail
-#              }
-
-#              if (!reply.Server-ID.DUID.LLT.Hardware-Type.Ethernet.Address) {
-#                      test_fail
-#              }
+if (0) {
+               #
+               #  This output omits the intermediate unions "Value"
+               #
+               %pairs.debug(reply.Server-ID)
+
+               #
+               #  The string output prints "Value.LLT", and "Value.Ethernet" here.
+               #
+               if (%pairs.print(reply.Server-Id) != 'Server-ID = { DUID = ::LLT, Value.LLT = { Hardware-Type = ::Ethernet, Time = "2012-11-21T08:36:00Z", Value.Ethernet = { Address = 00:11:22:33:44:55 } } }') {
+                       test_fail
+               }
+
+               if (!reply.Server-ID.DUID) {
+                       test_fail
+
+               } elsif (reply.Server-ID.DUID != ::LLT) {
+                       test_fail
+               }
+
+               if (!reply.Server-ID.LLT) { # FAILS - LLT should be an alias to Value.LLT
+                       test_fail
+               }
+
+               if (!reply.Server-ID.Value.LLT) { # FAILS - Value.LLT should exist here!
+                       test_fail
+               }
+
+               if (!reply.Server-ID.LLT.Hardware-Type) {
+                       test_fail
+
+               } elsif (reply.Server-ID.LLT.Hardware-Type != ::Ethernet) {
+                       test_fail
+               }
+
+               if (!reply.Server-ID.LLT.Time) {
+                       test_fail
+               }
+
+               if (!reply.Server-ID.LLT.Value.Ethernet.Address) {
+                       test_fail
+               }
+} # if (0)
        }
 }