]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Remove Tmp- attributes from remaining module tests
authorNick Porter <nick@portercomputing.co.uk>
Mon, 8 Jan 2024 12:35:35 +0000 (12:35 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Mon, 8 Jan 2024 12:35:35 +0000 (12:35 +0000)
src/tests/modules/files/compound_key
src/tests/modules/files/compound_key.unlang
src/tests/modules/files/module.conf
src/tests/modules/icmp/ping.unlang
src/tests/modules/idn/idn.unlang

index 3f491f279c211f62ee773f20bd77247970a9c6d8..1dfbe0d8b358cfa1b4018ef50999a3060fe6c4de 100644 (file)
@@ -1 +1 @@
-test0:test1    Tmp-String-0 := 'matched'
+test0:test1    Realm := 'matched'
index beedfe54598cd159a336919fbb0488b87c4dcfac..72dec4dd2f898a69d0c32f059a86ea6cba6dae19 100644 (file)
@@ -1,12 +1,12 @@
-&Tmp-String-0 := 'test0'
-&Tmp-String-1 := 'test1'
+&Filter-Id := 'test0'
+&Callback-Id := 'test1'
 
 compound_key
 if (!ok) {
        test_fail
 }
-
-if (!(&control.Tmp-String-0 == 'matched')) {
+debug_all
+if (!(&control.Realm == 'matched')) {
        test_fail
 }
 
index 00870dbea19aa8965677a920c3b699aa25b92ec4..d8e6ea4eb436cdd637fb2ed9ec1301e8331c5c34 100644 (file)
@@ -19,12 +19,12 @@ files subnet2 {
 }
 
 files compound_key {
-       key = "%{Tmp-String-0}:%{Tmp-String-1}"
+       key = "%{Filter-Id}:%{Callback-Id}"
        filename = $ENV{MODULE_TEST_DIR}/compound_key
 }
 
 #
-#   
+#
 #
 #
 #
index 93050d280d98fda2e1e8ab359b8e9fdf49f0cf43..61f11efaad6e2ec2d3eeb411590fee596ae60e95 100644 (file)
@@ -1,9 +1,10 @@
-&control.Tmp-String-0 := %ping(127.0.0.1)
+string test_string
+&test_string := %ping(127.0.0.1)
 
 #
 #  @todo - conditions do not yet support YIELD
 #
-if (&control.Tmp-String-0 == "yes") {
+if (&test_string == "yes") {
        &control.Password.Cleartext := "hello"
 
        &reply += {
index 1fe85afe9bb1f2195bdd4dffa7a3860366c7315d..d7c6c5f675118e4e16879ce0d6b8f398ef13de42 100644 (file)
@@ -1,34 +1,34 @@
+string test_string
 #
 #  PRE: update if
 #
 
-&Tmp-String-0 := "%idn('example.com')"
-&Tmp-String-1 := "%idn('èxâmpłé.com')"
-&Tmp-String-2 := "%idn('пример.com')"
-&Tmp-String-3 := "%idn('παράδειγμα.com')"
-&Tmp-String-4 := "%idn('ตัวอย่าง.com')"
-
-if (&Tmp-String-0 != "example.com") {
+&test_string := "%idn('example.com')"
+if (&test_string != "example.com") {
         test_fail
 }
 
-if (&Tmp-String-1 != "xn--xmp-ila2ak63d.com") {
+&test_string := "%idn('èxâmpłé.com')"
+if (&test_string != "xn--xmp-ila2ak63d.com") {
         test_fail
 }
 
-if (&Tmp-String-2 != "xn--e1afmkfd.com") {
+&test_string := "%idn('пример.com')"
+if (&test_string != "xn--e1afmkfd.com") {
         test_fail
 }
 
-if (&Tmp-String-3 != "xn--hxajbheg2az3al.com") {
+&test_string := "%idn('παράδειγμα.com')"
+if (&test_string != "xn--hxajbheg2az3al.com") {
         test_fail
 }
 
-if (&Tmp-String-4 != "xn--72c1a1bt4awk9o.com") {
+&test_string := "%idn('ตัวอย่าง.com')"
+if (&test_string != "xn--72c1a1bt4awk9o.com") {
         test_fail
 }
 
-&Tmp-String-0 := "%idn('invalid_example.com')"
+&test_string := "%idn('invalid_example.com')"
 
 if (&Module-Failure-Message != "Non-digit/letter/hyphen in input") {
         test_fail
@@ -40,7 +40,7 @@ if (&Module-Failure-Message == "") {
 
 &request -= &Module-Failure-Message[*]
 
-&Tmp-String-0 := "%idn('a.véry.löng.ņàme.whîch.when.expânded.exceedş.ţhe.dns.stanđard.fór.string.łength.of.twø.hündred.ând.fifty.threé.charáctèrs.and.therefore.is.invalid.for.idn.conversion')"
+&test_string := "%idn('a.véry.löng.ņàme.whîch.when.expânded.exceedş.ţhe.dns.stanđard.fór.string.łength.of.twø.hündred.ând.fifty.threé.charáctèrs.and.therefore.is.invalid.for.idn.conversion')"
 
 if (&Module-Failure-Message != "Conversion was truncated") {
         test_fail