]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add record_query_number to SQL tests
authorNick Porter <nick@portercomputing.co.uk>
Fri, 9 May 2025 17:21:20 +0000 (18:21 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Sun, 11 May 2025 18:17:12 +0000 (19:17 +0100)
src/tests/modules/sql/acct_0_start.unlang
src/tests/modules/sql/acct_update_no_start.unlang
src/tests/modules/sql_mysql/module.conf
src/tests/modules/sql_postgresql/module.conf
src/tests/modules/sql_sqlite/module.conf

index 64921b11630c6864e3ce49b5c4aea3bf09967886..a749ed6c273d9958f3d203ac54c22775c54f9831 100644 (file)
@@ -38,3 +38,9 @@ if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 0)) {
 else {
        test_pass
 }
+
+if (!&control:SQL-Query-Number || (&control:SQL-Query-Number != 1)) {
+       test_fail
+} else {
+       test_pass
+}
index 3875b2dc8f03af651287874937b4ab0b04537b7c..9325cf692bef2ad52a327530de549c3fb3fc99e2 100644 (file)
@@ -38,3 +38,9 @@ if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 30)) {
 else {
        test_pass
 }
+
+if (!&control:SQL-Query-Number || (&control:SQL-Query-Number != 2)) {
+       test_fail
+} else {
+       test_pass
+}
index e3aa02ddea804c63ea1a08c8b16fcc14107c89a6..33054ed165cfbdada906e821a101a5d1a2ef3b11 100644 (file)
@@ -48,6 +48,8 @@ sql {
        # The group attribute specific to this instance of rlm_sql
        group_attribute = "SQL-Group"
 
+       record_query_number = yes
+
        # Read database-specific queries
        $INCLUDE ${modconfdir}/${.:name}/main/${dialect}/queries.conf
 }
index ee9a8a9367b92b9ac2c6468d8caeee321c285bcd..18796e50218910357063660304d2ac857020310c 100644 (file)
@@ -47,6 +47,8 @@ sql {
        # The group attribute specific to this instance of rlm_sql
        group_attribute = "SQL-Group"
 
+       record_query_number = yes
+
        # Read database-specific queries
        $INCLUDE ${modconfdir}/${.:name}/main/${dialect}/queries.conf
 }
index 1d8ac74e99fb8c62b10fd63154e1d0b197d2b7f7..622d1d3afff2812387cf9588f62f8c3db35b9229 100644 (file)
@@ -47,6 +47,8 @@ sql {
        # The group attribute specific to this instance of rlm_sql
        group_attribute = "SQL-Group"
 
+       record_query_number = yes
+
        # Read database-specific queries
        $INCLUDE ${modconfdir}/${.:name}/main/${dialect}/queries.conf
 }