]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix 'join' keyword test
authorJorge Pereira <jpereira@freeradius.org>
Fri, 1 Sep 2023 19:20:38 +0000 (16:20 -0300)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 2 Sep 2023 12:56:21 +0000 (08:56 -0400)
now that unit_test_module creates Net.*. the test output has
changed.  So we update the test.

src/tests/keywords/join

index 8b37bfe2b1b4ee9af33a38f3d6f441ce0b025e04..796549be398a632c24ad645273cc78facad0ecd5 100644 (file)
@@ -1,15 +1,20 @@
 #
 # PRE: if concat
 #
-&request -= &Packet-Type[*]
+&control -= &Password[*]
 
-&request += {
+&control += {
+       &User-Name = &request.User-Name
+       &User-Password = &request.User-Password
        &Tmp-String-0 = "ab c"
        &Tmp-String-0 = "de fg"
        &Tmp-Integer-0 = 123
 }
 
-&control.Tmp-IP-Address-0 := 192.168.1.254
+&request.Tmp-IP-Address-0 := 192.168.1.254
+
+debug_control
+debug_request
 
 #
 #  Don't insert this string into the request list, because we're getting its value
 #
 #  @todo - fix this...
 #
-&control.Tmp-String-1 := "%(concat:%(join:%{request.[*]} %{control.Tmp-IP-Address-0}) '. ')"
+&control.Tmp-String-1 := "%(concat:%(join:%{control.[*]} %{request.Tmp-IP-Address-0}) '. ')"
 
 if (!(&control.Tmp-String-1 == "bob. hello. ab c. de fg. 123. 192.168.1.254")) {
        test_fail
 }
 
-&Tmp-String-2 := "%(concat:%(join:%{Tmp-String-0[*]} %{Tmp-Integer-0}) ,)"
-if (!(&Tmp-String-2 == "ab c,de fg,123")) {
+&control.Tmp-String-2 := "%(concat:%(join:%{control.Tmp-String-0[*]} %{control.Tmp-Integer-0}) ,)"
+if (!(&control.Tmp-String-2 == "ab c,de fg,123")) {
        test_fail
 }