From: Alan T. DeKok Date: Thu, 1 Sep 2022 22:10:15 +0000 (-0400) Subject: simplification X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd0632e681169a5687af7f8badc09cd4014b62fa;p=thirdparty%2Ffreeradius-server.git simplification perl -p -i -e 's/&request.Tmp/&Tmp/' src/tests/keywords/* --- diff --git a/src/tests/keywords/cast-ipaddr b/src/tests/keywords/cast-ipaddr index 56f27f2291d..15609733b72 100644 --- a/src/tests/keywords/cast-ipaddr +++ b/src/tests/keywords/cast-ipaddr @@ -2,7 +2,7 @@ # PRE: if redundant # &request.NAS-IP-Address := 127.0.0.1 -&request.Tmp-Integer-0 := 0x7f000001 +&Tmp-Integer-0 := 0x7f000001 &Tmp-String-0 := &NAS-IP-Address diff --git a/src/tests/keywords/comments b/src/tests/keywords/comments index 897618373ee..e45834ab78d 100644 --- a/src/tests/keywords/comments +++ b/src/tests/keywords/comments @@ -16,7 +16,7 @@ update { #}'{ Opening block with extra special chars {} '" &control.User-Name := 'whatever' # do some random stuff } #{'} Closing block with extra special chars {} '" -update { &request.Tmp-String-0 := 'candy' } # Comment after unicorn block +update { &Tmp-String-0 := 'candy' } # Comment after unicorn block &request += { &Reply-Message = 'I am #literally a comment #' @@ -25,7 +25,7 @@ update { &request.Tmp-String-0 := 'candy' } # Comment after unicorn block &Reply-Message = "I am #literally a comment #" } -if (&request.Tmp-String-0 != 'candy') { +if (&Tmp-String-0 != 'candy') { test_fail } diff --git a/src/tests/keywords/concat b/src/tests/keywords/concat index 56a82c1e0b4..c71ca4da688 100644 --- a/src/tests/keywords/concat +++ b/src/tests/keywords/concat @@ -23,7 +23,7 @@ ok # separate updates &Tmp-String-1 = "%(concat:%(ungroup:%{request[*]}) ', ')" } -if (&request.Tmp-String-1 != "bob, hello, ab c, de fg, 123") { +if (&Tmp-String-1 != "bob, hello, ab c, de fg, 123") { test_fail } @@ -31,7 +31,7 @@ if (&request.Tmp-String-1 != "bob, hello, ab c, de fg, 123") { &Tmp-String-2 = "%(concat:%{Tmp-String-0[*]} ', ')" } -if (&request.Tmp-String-2 != "ab c, de fg") { +if (&Tmp-String-2 != "ab c, de fg") { test_fail } @@ -40,7 +40,7 @@ if (&request.Tmp-String-2 != "ab c, de fg") { &Tmp-String-3 = "%(concat:%{Tmp-String-0[*]})" } -if (&request.Tmp-String-3 != "ab cde fg") { +if (&Tmp-String-3 != "ab cde fg") { test_fail } @@ -49,7 +49,7 @@ if (&request.Tmp-String-3 != "ab cde fg") { &Tmp-String-4 = "%(concat:%{Tmp-String-0[*]} ,)" } -if (&request.Tmp-String-4 != "ab c,de fg") { +if (&Tmp-String-4 != "ab c,de fg") { test_fail } @@ -58,7 +58,7 @@ if (&request.Tmp-String-4 != "ab c,de fg") { &Tmp-String-5 = "%(concat:%{Tmp-String-0[*]} |-)" } -if (&request.Tmp-String-5 !="ab c|-de fg") { +if (&Tmp-String-5 !="ab c|-de fg") { test_fail } diff --git a/src/tests/keywords/edit-group b/src/tests/keywords/edit-group index 0690da16f02..050001cf4c2 100644 --- a/src/tests/keywords/edit-group +++ b/src/tests/keywords/edit-group @@ -7,20 +7,20 @@ # them are rolled back. # group { - &request.Tmp-String-0 := "foo" - &request.Tmp-String-1 := %{request.Tmp-Integer-0} # doesn't exist - &request.Tmp-String-2 := "bar" + &Tmp-String-0 := "foo" + &Tmp-String-1 := %{request.Tmp-Integer-0} # doesn't exist + &Tmp-String-2 := "bar" } -if (&request.Tmp-String-0) { +if (&Tmp-String-0) { test_fail } -if (&request.Tmp-String-1) { +if (&Tmp-String-1) { test_fail } -if (&request.Tmp-String-2) { +if (&Tmp-String-2) { test_fail } @@ -28,20 +28,20 @@ if (&request.Tmp-String-2) { # All of these succeed individually, so all of them should succeed. # group { - &request.Tmp-String-0 := "foo" - &request.Tmp-String-1 := "yup" - &request.Tmp-String-2 := "bar" + &Tmp-String-0 := "foo" + &Tmp-String-1 := "yup" + &Tmp-String-2 := "bar" } -if (&request.Tmp-String-0 != "foo") { +if (&Tmp-String-0 != "foo") { test_fail } -if (&request.Tmp-String-1 != "yup") { +if (&Tmp-String-1 != "yup") { test_fail } -if (&request.Tmp-String-2 != "bar") { +if (&Tmp-String-2 != "bar") { test_fail } diff --git a/src/tests/keywords/edit-leaf-multivalue b/src/tests/keywords/edit-leaf-multivalue index 246e9c70168..a67efad2752 100644 --- a/src/tests/keywords/edit-leaf-multivalue +++ b/src/tests/keywords/edit-leaf-multivalue @@ -1,7 +1,7 @@ # # PRE: edit # -&request.Tmp-String-0 := { +&Tmp-String-0 := { "foo", "bar", "baz", @@ -12,19 +12,19 @@ if (%{request.Tmp-String-0[#]} != 4) { test_fail } -if (&request.Tmp-String-0[0] != "foo") { +if (&Tmp-String-0[0] != "foo") { test_fail } -if (&request.Tmp-String-0[1] != "bar") { +if (&Tmp-String-0[1] != "bar") { test_fail } -if (&request.Tmp-String-0[2] != "baz") { +if (&Tmp-String-0[2] != "baz") { test_fail } -if (&request.Tmp-String-0[3] != "bob") { +if (&Tmp-String-0[3] != "bob") { test_fail } diff --git a/src/tests/keywords/edit-leaf-star b/src/tests/keywords/edit-leaf-star index f11cd8d62b3..e4664c11daf 100644 --- a/src/tests/keywords/edit-leaf-star +++ b/src/tests/keywords/edit-leaf-star @@ -1,7 +1,7 @@ # # PRE: edit # -&request.Tmp-Integer-0 := { 1, 3, 5, 7, 11 } +&Tmp-Integer-0 := { 1, 3, 5, 7, 11 } &Tmp-Integer-1 := 0 diff --git a/src/tests/keywords/edit-list b/src/tests/keywords/edit-list index b12bf9a9f91..4152614ac1d 100644 --- a/src/tests/keywords/edit-list +++ b/src/tests/keywords/edit-list @@ -5,7 +5,7 @@ &control.Tmp-String-0 := "foo" # Doesn't exist -if (&request.Tmp-String-0) { +if (&Tmp-String-0) { test_fail } @@ -13,14 +13,14 @@ if (&request.Tmp-String-0) { &request += &control # Does exist, and is the last attribute -if (!&request.Tmp-String-0[n]) { +if (!&Tmp-String-0[n]) { test_fail } &request -= &Tmp-String-0[*] # Doesn't exist -if (&request.Tmp-String-0) { +if (&Tmp-String-0) { test_fail } @@ -28,7 +28,7 @@ if (&request.Tmp-String-0) { &request ^= &control # Does exist, and is at offset 0 -if (!&request.Tmp-String-0[0]) { +if (!&Tmp-String-0[0]) { test_fail } diff --git a/src/tests/keywords/edit-list-remove b/src/tests/keywords/edit-list-remove index 11ccda4760b..e6d03d80482 100644 --- a/src/tests/keywords/edit-list-remove +++ b/src/tests/keywords/edit-list-remove @@ -9,7 +9,7 @@ } # Does exist -if (!&request.Tmp-String-0) { +if (!&Tmp-String-0) { test_fail } @@ -17,16 +17,16 @@ if (!&request.Tmp-String-0) { &request -= &Tmp-String-0 # Does not exist -if (&request.Tmp-String-0) { +if (&Tmp-String-0) { test_fail } # Other things still exist -if (!&request.Tmp-Octets-0) { +if (!&Tmp-Octets-0) { test_fail } -if (!&request.Tmp-Integer-0) { +if (!&Tmp-Integer-0) { test_fail } @@ -39,34 +39,34 @@ if (!&request.Tmp-Integer-0) { &Tmp-String-0 = "baz" } -if (!&request.Tmp-String-0) { +if (!&Tmp-String-0) { test_fail } &request -= &Tmp-String-0[0] # the first one has been removed -if (&request.Tmp-String-0[0] != "bar") { +if (&Tmp-String-0[0] != "bar") { test_fail } # Other things still exist -if (!&request.Tmp-Octets-0) { +if (!&Tmp-Octets-0) { test_fail } -if (!&request.Tmp-Integer-0) { +if (!&Tmp-Integer-0) { test_fail } &request -= &Tmp-String-0[*] # Does not exist -if (&request.Tmp-String-0) { +if (&Tmp-String-0) { test_fail } -&request.Tmp-String-0 := { "foo", "bar", "baz" } +&Tmp-String-0 := { "foo", "bar", "baz" } # # Remove one by value. diff --git a/src/tests/keywords/edit-merge b/src/tests/keywords/edit-merge index 44a175f3f9e..3ae0d27cc84 100644 --- a/src/tests/keywords/edit-merge +++ b/src/tests/keywords/edit-merge @@ -8,24 +8,24 @@ # = A' MERGE B' if A and B are lists # -&request.Tmp-String-0 := "foo" +&Tmp-String-0 := "foo" &control.Tmp-String-0 := "bar" # merge &request >= &control -if (!&request.Tmp-String-0) { +if (!&Tmp-String-0) { test_fail } # The original value should be unchanged -if (!(&request.Tmp-String-0 == "foo")) { +if (!(&Tmp-String-0 == "foo")) { %(debug_attr:request[*]) test_fail } # and the new value should not be there -if (&request.Tmp-String-0 == "bar") { +if (&Tmp-String-0 == "bar") { %(debug_attr:request[*]) test_fail } diff --git a/src/tests/keywords/edit-merge-lhs b/src/tests/keywords/edit-merge-lhs index c3fc3fd7493..57662ed6234 100644 --- a/src/tests/keywords/edit-merge-lhs +++ b/src/tests/keywords/edit-merge-lhs @@ -8,24 +8,24 @@ # = A' MERGE B' if A and B are lists # -&request.Tmp-String-0 := "foo" +&Tmp-String-0 := "foo" &control.Tmp-String-0 := "bar" # merge &request <= &control -if (!&request.Tmp-String-0) { +if (!&Tmp-String-0) { test_fail } # we want the *control* version -if (!(&request.Tmp-String-0 == "bar")) { +if (!(&Tmp-String-0 == "bar")) { %(debug_attr:request[*]) test_fail } # and the original value should not be there -if (&request.Tmp-String-0 == "foo") { +if (&Tmp-String-0 == "foo") { %(debug_attr:request[*]) test_fail } diff --git a/src/tests/keywords/edit-union b/src/tests/keywords/edit-union index 981d715d004..a486f141052 100644 --- a/src/tests/keywords/edit-union +++ b/src/tests/keywords/edit-union @@ -8,24 +8,24 @@ # = A' UNION B' if A and B are lists # -&request.Tmp-String-0 := "foo" +&Tmp-String-0 := "foo" &control.Tmp-String-0 := "bar" # union &request |= &control -if (!&request.Tmp-String-0) { +if (!&Tmp-String-0) { test_fail } # The original value should be unchanged -if (&request.Tmp-String-0[0] != "foo") { +if (&Tmp-String-0[0] != "foo") { %(debug_attr:request[*]) test_fail } # and the new value should be there, too -if (&request.Tmp-String-0[1] != "bar") { +if (&Tmp-String-0[1] != "bar") { %(debug_attr:request[*]) test_fail } diff --git a/src/tests/keywords/hex b/src/tests/keywords/hex index 07307a5457a..bf65d9bd403 100644 --- a/src/tests/keywords/hex +++ b/src/tests/keywords/hex @@ -18,7 +18,7 @@ ok # break up edit sections -&request.Tmp-String-1 := { +&Tmp-String-1 := { "%{hex:%{Tmp-String-0}}" "%{hex:%{Tmp-Octets-0}}" "%{hex:%{Tmp-IP-Address-0}}" @@ -69,7 +69,7 @@ if (&Tmp-String-1[7] != '3a') { test_fail } -&request.Tmp-String-1 := { +&Tmp-String-1 := { "%{hex:%{Tmp-Cast-Short}}" "%{hex:%{Tmp-Cast-Ether}}" "%{hex:%{Tmp-Cast-Integer64}}" diff --git a/src/tests/keywords/if-multivalue b/src/tests/keywords/if-multivalue index 5be80c6a015..f7311e00702 100644 --- a/src/tests/keywords/if-multivalue +++ b/src/tests/keywords/if-multivalue @@ -47,22 +47,22 @@ # # Mmmm O(N^2) # -if (&request.Tmp-String-0[*] != &control.Tmp-String-0[*]) { +if (&Tmp-String-0[*] != &control.Tmp-String-0[*]) { test_fail } -if (&request.Tmp-String-0[*] == &control.Tmp-String-1[*]) { +if (&Tmp-String-0[*] == &control.Tmp-String-1[*]) { test_fail } -if (&request.Tmp-String-1[*] == &control.Tmp-String-0[*]) { +if (&Tmp-String-1[*] == &control.Tmp-String-0[*]) { test_fail } # # Integer comparison and normalisation # -if (&request.Tmp-Integer-0 != &control.Tmp-Integer-0) { +if (&Tmp-Integer-0 != &control.Tmp-Integer-0) { test_fail } @@ -70,14 +70,14 @@ if (&request.Tmp-Integer-0 != &control.Tmp-Integer-0) { # if any value of request.Tmp-Integer-0 > any value of # request.Tmp-Integer-1 then evaluate to true # -if (&request.Tmp-Integer-0[*] > &control.Tmp-Integer-1[*]) { +if (&Tmp-Integer-0[*] > &control.Tmp-Integer-1[*]) { test_fail } # # Compiled regex comparisons # -if (&request.Tmp-String-1[*] !~ /PEONS$/) { +if (&Tmp-String-1[*] !~ /PEONS$/) { test_fail } @@ -92,19 +92,19 @@ if (&control.Tmp-String-1 =~ /DINKS$/) { # # Dynamic regex comparisons # -if (&request.Tmp-String-1[*] !~ /%{Tmp-String-2[0]}$/) { +if (&Tmp-String-1[*] !~ /%{Tmp-String-2[0]}$/) { test_fail } -if (&request.Tmp-String-1 =~ /%{Tmp-String-2[1]}$/) { +if (&Tmp-String-1 =~ /%{Tmp-String-2[1]}$/) { test_fail } -if (&request.Tmp-String-1 !~ /%{Tmp-String-2[2]}$/) { +if (&Tmp-String-1 !~ /%{Tmp-String-2[2]}$/) { test_fail } -if (&request.Tmp-String-1 =~ /%{Tmp-String-2[#]}$/) { +if (&Tmp-String-1 =~ /%{Tmp-String-2[#]}$/) { test_fail } @@ -126,11 +126,11 @@ if (&control.Tmp-String-1[*] == 'foo') { test_fail } -if (&request.Tmp-Integer-0[*] > 10) { +if (&Tmp-Integer-0[*] > 10) { test_fail } -if (!(&request.Tmp-Integer-0[*] < 10)) { +if (!(&Tmp-Integer-0[*] < 10)) { test_fail } diff --git a/src/tests/keywords/if-regex-match b/src/tests/keywords/if-regex-match index 596c7a4a71d..e9c4336b090 100644 --- a/src/tests/keywords/if-regex-match +++ b/src/tests/keywords/if-regex-match @@ -1,6 +1,6 @@ # PRE: if # -&request.Tmp-Integer-0 := '123456789' +&Tmp-Integer-0 := '123456789' # Non matching on attribute ref if (&User-Name !~ /^([0-9])_([0-9])?_([0-9]*)_([0-9]+)_([^_])_(6)_([7-8])%{Tmp-String-0}/) { @@ -91,7 +91,7 @@ if (&Tmp-Integer-0 !~ /%{Tmp-Integer-0}/) { test_fail } -&request.Tmp-String-0 := "foo\nbar" +&Tmp-String-0 := "foo\nbar" # uncompiled - ref - multiline if (&Tmp-String-0 !~ /^foo$%{Tmp-String-8}/m) { diff --git a/src/tests/keywords/join b/src/tests/keywords/join index f6ed97e47f2..2098b7b7f28 100644 --- a/src/tests/keywords/join +++ b/src/tests/keywords/join @@ -30,7 +30,7 @@ if (&control.Tmp-String-1 != "bob. hello. ab c. de fg. 123. 192.168.1.254") { } &Tmp-String-2 := "%(concat:%(join:%{Tmp-String-0[*]} %{Tmp-Integer-0}) ,)" -if (&request.Tmp-String-2 != "ab c,de fg,123") { +if (&Tmp-String-2 != "ab c,de fg,123") { test_fail } diff --git a/src/tests/keywords/pairs b/src/tests/keywords/pairs index fb60e13d2bd..89c35127aba 100644 --- a/src/tests/keywords/pairs +++ b/src/tests/keywords/pairs @@ -18,23 +18,23 @@ &Tmp-String-5 = "%(pairs:control.User-Name)" } -if (&request.Tmp-String-1 != "User-Name = \"bob\", User-Password = \"hello\", Tmp-String-0 = \"This is a string\", Tmp-String-0 = \"This is another one\", Tmp-Octets-0 = 0x000504030201, Tmp-Integer-0 = 7331") { +if (&Tmp-String-1 != "User-Name = \"bob\", User-Password = \"hello\", Tmp-String-0 = \"This is a string\", Tmp-String-0 = \"This is another one\", Tmp-Octets-0 = 0x000504030201, Tmp-Integer-0 = 7331") { test_fail } -if (&request.Tmp-String-2 != "Tmp-String-0 = \"This is a string\"") { +if (&Tmp-String-2 != "Tmp-String-0 = \"This is a string\"") { test_fail } -if (&request.Tmp-String-3 != "Tmp-String-0 = \"This is a string\", Tmp-String-0 = \"This is another one\"") { +if (&Tmp-String-3 != "Tmp-String-0 = \"This is a string\", Tmp-String-0 = \"This is another one\"") { test_fail } -if (&request.Tmp-String-4 != "Password.Cleartext = \"hello\"") { +if (&Tmp-String-4 != "Password.Cleartext = \"hello\"") { test_fail } -if (&request.Tmp-String-5 != '') { +if (&Tmp-String-5 != '') { test_fail } diff --git a/src/tests/keywords/pap b/src/tests/keywords/pap index 84d8ac5efc3..033b6412144 100644 --- a/src/tests/keywords/pap +++ b/src/tests/keywords/pap @@ -2,7 +2,7 @@ # PRE: edit-list-remove if # &control := {} -&request.Tmp-String-0 := "5RNqNl8iYLbkCc7JhR8as4TtDDCX6otuuWtcja8rITUyx9zrnHSe9tTHGmKK" # 60 byte salt +&Tmp-String-0 := "5RNqNl8iYLbkCc7JhR8as4TtDDCX6otuuWtcja8rITUyx9zrnHSe9tTHGmKK" # 60 byte salt # # Unencoded Password.Cleartext in password with header diff --git a/src/tests/keywords/parallel-rcode b/src/tests/keywords/parallel-rcode index e1e5f81ee1f..c0ad6e8982e 100644 --- a/src/tests/keywords/parallel-rcode +++ b/src/tests/keywords/parallel-rcode @@ -37,7 +37,7 @@ group { if (!fail) { test_fail } -if (&request.Tmp-String-0) { +if (&Tmp-String-0) { test_fail } @@ -61,7 +61,7 @@ group { if (!fail) { test_fail } -if (&request.Tmp-String-0 != 'foo') { +if (&Tmp-String-0 != 'foo') { test_fail } diff --git a/src/tests/keywords/sha1 b/src/tests/keywords/sha1 index 02149814901..3636c0b6a5b 100644 --- a/src/tests/keywords/sha1 +++ b/src/tests/keywords/sha1 @@ -22,29 +22,29 @@ # Put "This is a string" into a file and call "sha1sum" on it. # You should get this string. # -if (&request.Tmp-Octets-2 != 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c) { +if (&Tmp-Octets-2 != 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c) { test_fail } -if (&request.Tmp-Octets-3 != 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c) { +if (&Tmp-Octets-3 != 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c) { test_fail } -if (&request.Tmp-Octets-4 != 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c) { +if (&Tmp-Octets-4 != 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c) { test_fail } # # SHA1 of empty string # -if (&request.Tmp-Octets-5 != 0xda39a3ee5e6b4b0d3255bfef95601890afd80709) { +if (&Tmp-Octets-5 != 0xda39a3ee5e6b4b0d3255bfef95601890afd80709) { test_fail } # # SHA1 HMAC with attribute references # -if (&request.Tmp-Octets-6 != 0xeffcdf6ae5eb2fa2d27416d5f184df9c259a7c79) { +if (&Tmp-Octets-6 != 0xeffcdf6ae5eb2fa2d27416d5f184df9c259a7c79) { test_fail } diff --git a/src/tests/keywords/sha1-error b/src/tests/keywords/sha1-error index 5e382540fd5..828ffb5837c 100644 --- a/src/tests/keywords/sha1-error +++ b/src/tests/keywords/sha1-error @@ -3,7 +3,7 @@ # # SHA1 HMAC with missing key should fail # -&request.Tmp-Octets-1 := "%(hmacsha1:%{Tmp-String-1} )" # ERROR +&Tmp-Octets-1 := "%(hmacsha1:%{Tmp-String-1} )" # ERROR test_fail diff --git a/src/tests/keywords/sha2 b/src/tests/keywords/sha2 index 029eaa8b90b..9bba7e23f99 100644 --- a/src/tests/keywords/sha2 +++ b/src/tests/keywords/sha2 @@ -1,42 +1,42 @@ # # PRE: update if # -&request.Tmp-String-0 := "This is a string\n" -&request.Tmp-Octets-0 := 0x000504030201 +&Tmp-String-0 := "This is a string\n" +&Tmp-Octets-0 := 0x000504030201 -&request.Tmp-Octets-1 := "%{sha2_256:This is a string\n}" -&request.Tmp-Octets-2 := "%{sha2_256:%{Tmp-String-0}}" -&request.Tmp-Octets-3 := "%{sha2_256:%{request.Tmp-String-0}}" -&request.Tmp-Octets-4 := "%{sha2_256:%{request.Tmp-Octets-0}}" -&request.Tmp-Octets-5 := "%{sha2_256:%{request.Tmp-Octets-9}}" +&Tmp-Octets-1 := "%{sha2_256:This is a string\n}" +&Tmp-Octets-2 := "%{sha2_256:%{Tmp-String-0}}" +&Tmp-Octets-3 := "%{sha2_256:%{request.Tmp-String-0}}" +&Tmp-Octets-4 := "%{sha2_256:%{request.Tmp-Octets-0}}" +&Tmp-Octets-5 := "%{sha2_256:%{request.Tmp-Octets-9}}" # # Put "This is a string" into a file and call "sha2_256sum" on it. # You should get this string. # -if (&request.Tmp-Octets-1 != 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124) { +if (&Tmp-Octets-1 != 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124) { test_fail } -if (&request.Tmp-Octets-2 != 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124) { +if (&Tmp-Octets-2 != 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124) { test_fail } -if (&request.Tmp-Octets-3 != 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124) { +if (&Tmp-Octets-3 != 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124) { test_fail } # # SHA256 should also be able to cope with references to octet attributes # -if (&request.Tmp-Octets-4 != 0xf307e202b881fded70e58017aa0c4d7b29c76ab25d02bf078301a5f6635187eb) { +if (&Tmp-Octets-4 != 0xf307e202b881fded70e58017aa0c4d7b29c76ab25d02bf078301a5f6635187eb) { test_fail } # # SHA256 of empty string # -if (&request.Tmp-Octets-5 != 0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855) { +if (&Tmp-Octets-5 != 0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855) { test_fail } @@ -44,19 +44,19 @@ if (&request.Tmp-Octets-5 != 0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca # SHA512 and SHA256 share common code paths, so the tests don't need to be # as exhaustive. # -&request.Tmp-Octets-1 := "%{sha2_512:This is a string\n}" -&request.Tmp-Octets-2 := "%{sha2_512:%{Tmp-String-0}}" -&request.Tmp-Octets-3 := "%{sha2_512:%{request.Tmp-Octets-0}}" +&Tmp-Octets-1 := "%{sha2_512:This is a string\n}" +&Tmp-Octets-2 := "%{sha2_512:%{Tmp-String-0}}" +&Tmp-Octets-3 := "%{sha2_512:%{request.Tmp-Octets-0}}" -if (&request.Tmp-Octets-1 != 0x56b57df5cce42d4e35c644649798ea23ec16f4f4626e78faf4d2d8f430ea349bcc28cd5532457c82f0aa66bf68988346039fe75b900a92ff94fd53993d45990f) { +if (&Tmp-Octets-1 != 0x56b57df5cce42d4e35c644649798ea23ec16f4f4626e78faf4d2d8f430ea349bcc28cd5532457c82f0aa66bf68988346039fe75b900a92ff94fd53993d45990f) { test_fail } -if (&request.Tmp-Octets-2 != 0x56b57df5cce42d4e35c644649798ea23ec16f4f4626e78faf4d2d8f430ea349bcc28cd5532457c82f0aa66bf68988346039fe75b900a92ff94fd53993d45990f) { +if (&Tmp-Octets-2 != 0x56b57df5cce42d4e35c644649798ea23ec16f4f4626e78faf4d2d8f430ea349bcc28cd5532457c82f0aa66bf68988346039fe75b900a92ff94fd53993d45990f) { test_fail } -if (&request.Tmp-Octets-3 != 0xde80271eb5e03a1c24dd0cd823a22305a743ee3a54f1de5bf97adbf56984561154bfb6928b1da4ccc3f5dde9f4032ad461937b60b9ace4ad3898cf45c90596d7) { +if (&Tmp-Octets-3 != 0xde80271eb5e03a1c24dd0cd823a22305a743ee3a54f1de5bf97adbf56984561154bfb6928b1da4ccc3f5dde9f4032ad461937b60b9ace4ad3898cf45c90596d7) { test_fail } diff --git a/src/tests/keywords/subrequest-return b/src/tests/keywords/subrequest-return index 0ede029c0a3..24e644b29a6 100644 --- a/src/tests/keywords/subrequest-return +++ b/src/tests/keywords/subrequest-return @@ -13,7 +13,7 @@ if (&Tmp-String-1) { test_fail } -if (&request.Tmp-String-0 != "testing1234") { +if (&Tmp-String-0 != "testing1234") { test_fail } diff --git a/src/tests/keywords/update-prepend b/src/tests/keywords/update-prepend index 086511943e1..fde9093829d 100644 --- a/src/tests/keywords/update-prepend +++ b/src/tests/keywords/update-prepend @@ -11,15 +11,15 @@ update control { # Reset the request list and add the test strings # FIXME: # Temporary way to add multiple copies of an attribute - this should become -# &request.Tmp-String-0 += &control.Tmp-String-0 when multi copies of attributes +# &Tmp-String-0 += &control.Tmp-String-0 when multi copies of attributes # are copied again. Currently the desired syntax won't work due to tmpl_t only holding # a single value_box - so when mapt_to_list_mod() builds the list of value for the rhs # of the expression only the first one is copied to the tmpl_t. See around line 780 # of map_async.c update { - &request.Tmp-String-0 !* ANY - &request.Tmp-String-0 += &control.Tmp-String-0[0] - &request.Tmp-String-0 += &control.Tmp-String-0[1] + &Tmp-String-0 !* ANY + &Tmp-String-0 += &control.Tmp-String-0[0] + &Tmp-String-0 += &control.Tmp-String-0[1] } # Prepend a single value @@ -62,7 +62,7 @@ update control { # Prepend the list of Tmp-String-0 from request to the new attribute #update { -# &control.Tmp-String-0 ^= &request.Tmp-String-0 +# &control.Tmp-String-0 ^= &Tmp-String-0 #} # (Temporary method to acheive the same - as per issue noted above) diff --git a/src/tests/keywords/update-remove-any b/src/tests/keywords/update-remove-any index 8a312c21d8a..4260ed4ae23 100644 --- a/src/tests/keywords/update-remove-any +++ b/src/tests/keywords/update-remove-any @@ -2,10 +2,10 @@ # PRE: update # update { - &request.Tmp-String-0 := 'foobarbaz' - &request.Tmp-Integer-0 := 123456789 - &request.Tmp-IP-Address-0 := 192.0.2.1 - &request.Tmp-IP-Address-0 += 192.0.2.2 + &Tmp-String-0 := 'foobarbaz' + &Tmp-Integer-0 := 123456789 + &Tmp-IP-Address-0 := 192.0.2.1 + &Tmp-IP-Address-0 += 192.0.2.2 &control.Tmp-IP-Address-0 := 192.0.2.1 &control.Tmp-IP-Address-0 += 192.0.2.3 &control.Tmp-IP-Address-1 := 192.0.3.1 @@ -17,7 +17,7 @@ if (("%{Tmp-IP-Address-0[0]}" != 192.0.2.1) || ("%{Tmp-IP-Address-0[1]}" != 192. # Remove all attributes in the request list update { - &request.Tmp-IP-Address-0 !* ANY + &Tmp-IP-Address-0 !* ANY } # Non Tmp-IP-Address-0 address attributes should still be in the request list diff --git a/src/tests/keywords/update-remove-index b/src/tests/keywords/update-remove-index index bf050f3e8b6..a71680289a1 100644 --- a/src/tests/keywords/update-remove-index +++ b/src/tests/keywords/update-remove-index @@ -3,13 +3,13 @@ # update { - &request.Tmp-String-0 := 'foobarbaz' - &request.Tmp-Integer-0 := 123456789 - &request.Tmp-IP-Address-0 := 192.0.2.1 - &request.Tmp-IP-Address-0 += 192.0.2.2 - &request.Tmp-IP-Address-0 += 192.0.2.3 - &request.Tmp-IP-Address-0 += 192.0.2.2 - &request.Tmp-IP-Address-0 += 192.0.2.4 + &Tmp-String-0 := 'foobarbaz' + &Tmp-Integer-0 := 123456789 + &Tmp-IP-Address-0 := 192.0.2.1 + &Tmp-IP-Address-0 += 192.0.2.2 + &Tmp-IP-Address-0 += 192.0.2.3 + &Tmp-IP-Address-0 += 192.0.2.2 + &Tmp-IP-Address-0 += 192.0.2.4 } debug_request diff --git a/src/tests/keywords/update-remove-value b/src/tests/keywords/update-remove-value index a24b5de2ce5..8903081659e 100644 --- a/src/tests/keywords/update-remove-value +++ b/src/tests/keywords/update-remove-value @@ -3,12 +3,12 @@ # update { - &request.Tmp-String-0 := 'foobarbaz' - &request.Tmp-Integer-0 := 123456789 - &request.Tmp-IP-Address-0 := 192.0.2.1 - &request.Tmp-IP-Address-0 += 192.0.2.2 - &request.Tmp-IP-Address-0 += 192.0.2.3 - &request.Tmp-IP-Address-0 += 192.0.2.4 + &Tmp-String-0 := 'foobarbaz' + &Tmp-Integer-0 := 123456789 + &Tmp-IP-Address-0 := 192.0.2.1 + &Tmp-IP-Address-0 += 192.0.2.2 + &Tmp-IP-Address-0 += 192.0.2.3 + &Tmp-IP-Address-0 += 192.0.2.4 &control.Tmp-IP-Address-0 := 192.0.2.1 &control.Tmp-IP-Address-0 += 192.0.2.3 } @@ -22,7 +22,7 @@ if (("%{Tmp-IP-Address-0[0]}" != 192.0.2.1) || \ # Remove Tmp-IP-Address-0 with a specific value update { - &request.Tmp-IP-Address-0 -= 192.0.2.1 + &Tmp-IP-Address-0 -= 192.0.2.1 } # Only the 2nd, 3rd and 4th Tmp-IP-Address attributes should still be in the list @@ -35,7 +35,7 @@ if (("%{Tmp-IP-Address-0[0]}" != '192.0.2.2') || \ # Remove Tmp-IP-Address-0 with a specific value (somewhere in the middle) update { - &request.Tmp-IP-Address-0 -= 192.0.2.3 + &Tmp-IP-Address-0 -= 192.0.2.3 } # Only the 1st, and 3rd Tmp-IP-Address attributes should still be in the list @@ -47,7 +47,7 @@ if (("%{Tmp-IP-Address-0[0]}" != '192.0.2.2') || \ # Remove Tmp-IP-Address-0 with a specific value (which doesn't exist) update { - &request.Tmp-IP-Address-0 -= 192.0.2.3 + &Tmp-IP-Address-0 -= 192.0.2.3 } # Only the 1st, and 3rd Tmp-IP-Address attributes should still be in the list @@ -59,12 +59,12 @@ if (("%{Tmp-IP-Address-0[0]}" != '192.0.2.2') || \ # Remove Tmp-IP-Address-4 (which doesn't exist - more to check for SEGV/assert) update { - &request.Tmp-IP-Address-4 -= 192.0.2.3 + &Tmp-IP-Address-4 -= 192.0.2.3 } # Remove Tmp-IP-Address-0 with a specific value update { - &request.Tmp-IP-Address-0 -= 192.0.2.4 + &Tmp-IP-Address-0 -= 192.0.2.4 } # Only the 1st, and 3rd Tmp-IP-Address attributes should still be in the list @@ -75,7 +75,7 @@ if (("%{Tmp-IP-Address-0[0]}" != '192.0.2.2') || \ # Remove Tmp-IP-Address-0 with a specific value update { - &request.Tmp-IP-Address-0 -= 192.0.2.2 + &Tmp-IP-Address-0 -= 192.0.2.2 } # Only the 1st, and 3rd Tmp-IP-Address attributes should still be in the list