]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't use instance name in SQL module tests.
authorPhilippe Wooding <philippe.wooding@networkradius.com>
Thu, 14 May 2015 20:26:04 +0000 (22:26 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 2 Jun 2015 18:35:58 +0000 (14:35 -0400)
14 files changed:
src/tests/modules/sql_mysql/acct_0_start.unlang
src/tests/modules/sql_mysql/acct_1_update.unlang
src/tests/modules/sql_mysql/acct_2_stop.unlang
src/tests/modules/sql_mysql/acct_start_conflict.unlang
src/tests/modules/sql_mysql/acct_update_no_start.unlang
src/tests/modules/sql_mysql/auth.unlang
src/tests/modules/sql_mysql/module.conf
src/tests/modules/sql_postgresql/acct_0_start.unlang
src/tests/modules/sql_postgresql/acct_1_update.unlang
src/tests/modules/sql_postgresql/acct_2_stop.unlang
src/tests/modules/sql_postgresql/acct_start_conflict.unlang
src/tests/modules/sql_postgresql/acct_update_no_start.unlang
src/tests/modules/sql_postgresql/auth.unlang
src/tests/modules/sql_postgresql/module.conf

index 5b4cc81a533e99e0f08163df3c1d4d62f7a60a44..64921b11630c6864e3ce49b5c4aea3bf09967886 100644 (file)
@@ -2,7 +2,7 @@
 #  Clear out old data
 #
 update {
-       Tmp-String-0 := "%{sql_mysql:DELETE FROM radacct WHERE AcctSessionId = '00000000'}"
+       Tmp-String-0 := "%{sql:DELETE FROM radacct WHERE AcctSessionId = '00000000'}"
 }
 if (!&Tmp-String-0) {
        test_fail
@@ -11,7 +11,7 @@ else {
        test_pass
 }
 
-sql_mysql.accounting
+sql.accounting
 if (ok) {
        test_pass
 }
@@ -20,7 +20,7 @@ else {
 }
 
 update {
-       Tmp-Integer-0 := "%{sql_mysql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000000'}"
+       Tmp-Integer-0 := "%{sql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000000'}"
 }
 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 1)) {
        test_fail
@@ -30,7 +30,7 @@ else {
 }
 
 update {
-       Tmp-Integer-0 := "%{sql_mysql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000000'}"
+       Tmp-Integer-0 := "%{sql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000000'}"
 }
 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 0)) {
        test_fail
index 2eb461a9a11648141f4e81d53c85a785d14b7b9b..a2fa8e434d5ac97562f28f14032a571d30338e36 100644 (file)
@@ -1,7 +1,7 @@
 #
 #  PRE: acct_0_start
 #
-sql_mysql.accounting
+sql.accounting
 if (ok) {
        test_pass
 }
@@ -10,7 +10,7 @@ else {
 }
 
 update {
-       Tmp-Integer-0 := "%{sql_mysql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000000'}"
+       Tmp-Integer-0 := "%{sql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000000'}"
 }
 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 1)) {
        test_fail
@@ -20,7 +20,7 @@ else {
 }
 
 update {
-       Tmp-Integer-0 := "%{sql_mysql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000000'}"
+       Tmp-Integer-0 := "%{sql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000000'}"
 }
 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 30)) {
        test_fail
index 03f957002954fa1e2f5cc3b7f737ac2a59b5c630..0e319c7ea3a3692466941bd2014baf14d59d6692 100644 (file)
@@ -1,7 +1,7 @@
 #
 #  PRE: acct_1_update
 #
-sql_mysql.accounting
+sql.accounting
 if (ok) {
        test_pass
 }
@@ -10,7 +10,7 @@ else {
 }
 
 update {
-       Tmp-Integer-0 := "%{sql_mysql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000000'}"
+       Tmp-Integer-0 := "%{sql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000000'}"
 }
 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 1)) {
        test_fail
@@ -20,7 +20,7 @@ else {
 }
 
 update {
-       Tmp-Integer-0 := "%{sql_mysql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000000'}"
+       Tmp-Integer-0 := "%{sql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000000'}"
 }
 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 60)) {
        test_fail
index f3fabc1c5f960374fc4dd2e41ab5b6deae9244ce..4280db4e623aa0122c86e3f2a7026829fd1fc9b8 100644 (file)
@@ -10,7 +10,7 @@
 #  Clear out old data
 #
 update {
-       Tmp-String-0 := "%{sql_mysql:DELETE FROM radacct WHERE AcctSessionId = '00000001'}"
+       Tmp-String-0 := "%{sql:DELETE FROM radacct WHERE AcctSessionId = '00000001'}"
 }
 if (!&Tmp-String-0) {
        test_fail
@@ -22,7 +22,7 @@ else {
 #
 #  Insert the Accounting-Request start
 #
-sql_mysql.accounting
+sql.accounting
 if (ok) {
        test_pass
 }
@@ -34,7 +34,7 @@ else {
 #  Check the database has at least one row
 #
 update {
-       Tmp-Integer-0 := "%{sql_mysql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000001'}"
+       Tmp-Integer-0 := "%{sql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000001'}"
 }
 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 1)) {
        test_fail
@@ -47,7 +47,7 @@ else {
 #  Check acctsessiontime matches the value in the request
 #
 update {
-       Tmp-Integer-0 := "%{sql_mysql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000001'}"
+       Tmp-Integer-0 := "%{sql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000001'}"
 }
 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 0)) {
        test_fail
@@ -62,7 +62,7 @@ else {
 update request {
        Connect-Info = 'updated'
 }
-sql_mysql.accounting
+sql.accounting
 if (ok) {
        test_pass
 }
@@ -70,7 +70,7 @@ else {
        test_pass
 }
 update {
-       Tmp-String-0 := "%{sql_mysql:SELECT connectinfo_start FROM radacct WHERE AcctSessionId = '00000001'}"
+       Tmp-String-0 := "%{sql:SELECT connectinfo_start FROM radacct WHERE AcctSessionId = '00000001'}"
 }
 if (!&Tmp-Integer-0 || (&Tmp-String-0 != 'updated')) {
        test_fail
index 76dd4f4fb32ecaf0a25b20c5c386b7f8e4fa3ec3..f5025332155e4a4a8b2f997d58eaa4de7a17c841 100644 (file)
@@ -6,7 +6,7 @@
 #  Clear out old data
 #
 update {
-       Tmp-String-0 := "%{sql_mysql:DELETE FROM radacct WHERE AcctSessionId = '00000002'}"
+       Tmp-String-0 := "%{sql:DELETE FROM radacct WHERE AcctSessionId = '00000002'}"
 }
 if (!&Tmp-String-0) {
        test_fail
@@ -15,7 +15,7 @@ else {
        test_pass
 }
 
-sql_mysql.accounting
+sql.accounting
 if (ok) {
        test_pass
 }
@@ -24,7 +24,7 @@ else {
 }
 
 update {
-       Tmp-Integer-0 := "%{sql_mysql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000002'}"
+       Tmp-Integer-0 := "%{sql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000002'}"
 }
 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 1)) {
        test_fail
@@ -34,7 +34,7 @@ else {
 }
 
 update {
-       Tmp-Integer-0 := "%{sql_mysql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000002'}"
+       Tmp-Integer-0 := "%{sql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000002'}"
 }
 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 30)) {
        test_fail
index 1d1b93d92e53466c73c6501d561b5e5fd1f1d174..361a768fd84e3e16563508b79addb1f6ba7b90d8 100644 (file)
@@ -2,7 +2,7 @@
 #  Clear out old data
 #
 update {
-       Tmp-String-0 := "%{sql_mysql:DELETE FROM radcheck WHERE username = 'foo'}"
+       Tmp-String-0 := "%{sql:DELETE FROM radcheck WHERE username = 'foo'}"
 }
 if (!&Tmp-String-0) {
        test_fail
@@ -12,7 +12,7 @@ else {
 }
 
 update {
-       Tmp-String-0 := "%{sql_mysql:INSERT INTO radcheck (username, attribute, op, value) VALUES ('foo', 'NAS-IP-Address', '==', '1.2.3.4'), ('foo', 'Cleartext-Password', ':=', 'password')}"
+       Tmp-String-0 := "%{sql:INSERT INTO radcheck (username, attribute, op, value) VALUES ('foo', 'NAS-IP-Address', '==', '1.2.3.4'), ('foo', 'Cleartext-Password', ':=', 'password')}"
 }
 if (!&Tmp-String-0) {
        test_fail
@@ -22,7 +22,7 @@ else {
 }
 
 update {
-       Tmp-String-0 := "%{sql_mysql:DELETE FROM radreply WHERE username = 'foo'}"
+       Tmp-String-0 := "%{sql:DELETE FROM radreply WHERE username = 'foo'}"
 }
 if (!&Tmp-String-0) {
        test_fail
@@ -32,7 +32,7 @@ else {
 }
 
 update {
-       Tmp-String-0 := "%{sql_mysql:INSERT INTO radreply (username, attribute, op, value) VALUES ('foo', 'Idle-Timeout', ':=', '3600')}"
+       Tmp-String-0 := "%{sql:INSERT INTO radreply (username, attribute, op, value) VALUES ('foo', 'Idle-Timeout', ':=', '3600')}"
 }
 if (!&Tmp-String-0) {
        test_fail
@@ -41,4 +41,4 @@ else {
        test_pass
 }
 
-sql_mysql
+sql
index d8d1b1011782516b53154aed04bbec7a7be26db3..08a327079e3c9d0afd9ee29618b6f1a0a332f594 100644 (file)
@@ -1,4 +1,4 @@
-sql sql_mysql {
+sql {
        driver = "rlm_sql_mysql"
        dialect = "mysql"
 
index 51d008152d262b634c65b43378c58cc825d51e73..64921b11630c6864e3ce49b5c4aea3bf09967886 100644 (file)
@@ -2,7 +2,7 @@
 #  Clear out old data
 #
 update {
-       Tmp-String-0 := "%{sql_postgresql:DELETE FROM radacct WHERE AcctSessionId = '00000000'}"
+       Tmp-String-0 := "%{sql:DELETE FROM radacct WHERE AcctSessionId = '00000000'}"
 }
 if (!&Tmp-String-0) {
        test_fail
@@ -11,7 +11,7 @@ else {
        test_pass
 }
 
-sql_postgresql.accounting
+sql.accounting
 if (ok) {
        test_pass
 }
@@ -20,7 +20,7 @@ else {
 }
 
 update {
-       Tmp-Integer-0 := "%{sql_postgresql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000000'}"
+       Tmp-Integer-0 := "%{sql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000000'}"
 }
 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 1)) {
        test_fail
@@ -30,7 +30,7 @@ else {
 }
 
 update {
-       Tmp-Integer-0 := "%{sql_postgresql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000000'}"
+       Tmp-Integer-0 := "%{sql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000000'}"
 }
 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 0)) {
        test_fail
index 42b211bd5809467eef43541af400c39089780876..a2fa8e434d5ac97562f28f14032a571d30338e36 100644 (file)
@@ -1,7 +1,7 @@
 #
 #  PRE: acct_0_start
 #
-sql_postgresql.accounting
+sql.accounting
 if (ok) {
        test_pass
 }
@@ -10,7 +10,7 @@ else {
 }
 
 update {
-       Tmp-Integer-0 := "%{sql_postgresql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000000'}"
+       Tmp-Integer-0 := "%{sql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000000'}"
 }
 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 1)) {
        test_fail
@@ -20,7 +20,7 @@ else {
 }
 
 update {
-       Tmp-Integer-0 := "%{sql_postgresql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000000'}"
+       Tmp-Integer-0 := "%{sql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000000'}"
 }
 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 30)) {
        test_fail
index 7d24635fbfb59bb2abd23968f3d29f78d2a0a953..44e30c25e7008a48698d31852b1bd8b844edb5e6 100644 (file)
@@ -1,7 +1,7 @@
 #
 #  PRE: acct_1_update
 #
-sql_postgresql.accounting
+sql.accounting
 if (ok) {
        test_pass
 }
@@ -10,7 +10,7 @@ else {
 }
 
 update {
-       Tmp-Integer-0 := "%{sql_postgresql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000000'}"
+       Tmp-Integer-0 := "%{sql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000000'}"
 }
 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 1)) {
        test_fail
@@ -20,7 +20,7 @@ else {
 }
 
 update {
-       Tmp-Integer-0 := "%{sql_postgresql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000000'}"
+       Tmp-Integer-0 := "%{sql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000000'}"
 }
 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 120)) {
        test_fail
@@ -30,7 +30,7 @@ else {
 }
 
 update {
-       Tmp-String-0 := "%{sql_postgresql:SELECT AcctTerminateCause FROM radacct WHERE AcctSessionId = '00000000'}"
+       Tmp-String-0 := "%{sql:SELECT AcctTerminateCause FROM radacct WHERE AcctSessionId = '00000000'}"
 }
 if (!&Tmp-String-0 || (&Tmp-String-0 != 'User-Request')) {
        test_fail
index c69c88bad73e4a35852646bfc0ed4721c4c0dcf7..36db8cc71ccc5de69f16569ad1e936e998f63888 100644 (file)
@@ -6,7 +6,7 @@
 #  Clear out old data
 #
 update {
-       Tmp-String-0 := "%{sql_postgresql:DELETE FROM radacct WHERE AcctSessionId = '00000001'}"
+       Tmp-String-0 := "%{sql:DELETE FROM radacct WHERE AcctSessionId = '00000001'}"
 }
 if (!&Tmp-String-0) {
        test_fail
@@ -18,7 +18,7 @@ else {
 #
 #  Insert the Accounting-Request start
 #
-sql_postgresql.accounting
+sql.accounting
 if (ok) {
        test_pass
 }
@@ -30,7 +30,7 @@ else {
 #  Check the database has at least one row
 #
 update {
-       Tmp-Integer-0 := "%{sql_postgresql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000001'}"
+       Tmp-Integer-0 := "%{sql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000001'}"
 }
 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 1)) {
        test_fail
@@ -43,7 +43,7 @@ else {
 #  Check acctsessiontime matches the value in the request
 #
 update {
-       Tmp-Integer-0 := "%{sql_postgresql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000001'}"
+       Tmp-Integer-0 := "%{sql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000001'}"
 }
 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 0)) {
        test_fail
@@ -58,7 +58,7 @@ else {
 update request {
        Connect-Info = 'updated'
 }
-sql_postgresql.accounting
+sql.accounting
 if (ok) {
        test_pass
 }
@@ -66,7 +66,7 @@ else {
        test_fail
 }
 update {
-       Tmp-String-0 := "%{sql_postgresql:SELECT connectinfo_start FROM radacct WHERE AcctSessionId = '00000001'}"
+       Tmp-String-0 := "%{sql:SELECT connectinfo_start FROM radacct WHERE AcctSessionId = '00000001'}"
 }
 if (!&Tmp-Integer-0 || (&Tmp-String-0 != 'updated')) {
        test_fail
index acffcba746df9ac2b07e32f9cf9a7c7e524f6be6..7ff75ce6eacd3d3fe6c395232e01e09dc1ce60e6 100644 (file)
@@ -2,7 +2,7 @@
 #  Clear out old data
 #
 update {
-       Tmp-String-0 := "%{sql_postgresql:DELETE FROM radacct WHERE AcctSessionId = '00000002'}"
+       Tmp-String-0 := "%{sql:DELETE FROM radacct WHERE AcctSessionId = '00000002'}"
 }
 if (!&Tmp-String-0) {
        test_fail
@@ -11,7 +11,7 @@ else {
        test_pass
 }
 
-sql_postgresql.accounting
+sql.accounting
 if (ok) {
        test_pass
 }
@@ -20,7 +20,7 @@ else {
 }
 
 update {
-       Tmp-Integer-0 := "%{sql_postgresql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000002'}"
+       Tmp-Integer-0 := "%{sql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000002'}"
 }
 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 1)) {
        test_fail
@@ -30,7 +30,7 @@ else {
 }
 
 update {
-       Tmp-Integer-0 := "%{sql_postgresql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000002'}"
+       Tmp-Integer-0 := "%{sql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000002'}"
 }
 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 30)) {
        test_fail
index da5ddae4718e177121b60b4f49564dddd39f397a..361a768fd84e3e16563508b79addb1f6ba7b90d8 100644 (file)
@@ -2,7 +2,7 @@
 #  Clear out old data
 #
 update {
-       Tmp-String-0 := "%{sql_postgresql:DELETE FROM radcheck WHERE username = 'foo'}"
+       Tmp-String-0 := "%{sql:DELETE FROM radcheck WHERE username = 'foo'}"
 }
 if (!&Tmp-String-0) {
        test_fail
@@ -12,7 +12,7 @@ else {
 }
 
 update {
-       Tmp-String-0 := "%{sql_postgresql:INSERT INTO radcheck (username, attribute, op, value) VALUES ('foo', 'NAS-IP-Address', '==', '1.2.3.4'), ('foo', 'Cleartext-Password', ':=', 'password')}"
+       Tmp-String-0 := "%{sql:INSERT INTO radcheck (username, attribute, op, value) VALUES ('foo', 'NAS-IP-Address', '==', '1.2.3.4'), ('foo', 'Cleartext-Password', ':=', 'password')}"
 }
 if (!&Tmp-String-0) {
        test_fail
@@ -22,7 +22,7 @@ else {
 }
 
 update {
-       Tmp-String-0 := "%{sql_postgresql:DELETE FROM radreply WHERE username = 'foo'}"
+       Tmp-String-0 := "%{sql:DELETE FROM radreply WHERE username = 'foo'}"
 }
 if (!&Tmp-String-0) {
        test_fail
@@ -32,7 +32,7 @@ else {
 }
 
 update {
-       Tmp-String-0 := "%{sql_postgresql:INSERT INTO radreply (username, attribute, op, value) VALUES ('foo', 'Idle-Timeout', ':=', '3600')}"
+       Tmp-String-0 := "%{sql:INSERT INTO radreply (username, attribute, op, value) VALUES ('foo', 'Idle-Timeout', ':=', '3600')}"
 }
 if (!&Tmp-String-0) {
        test_fail
@@ -41,4 +41,4 @@ else {
        test_pass
 }
 
-sql_postgresql
+sql
index 7fbda39ac4a0dee7835c766a1963ee9c31d6c5d1..2d2c82cd3970cf882a086024d4a21204c737b75d 100644 (file)
@@ -1,4 +1,4 @@
-sql sql_postgresql {
+sql {
        driver = "rlm_sql_postgresql"
        dialect = "postgresql"
 
@@ -10,7 +10,6 @@ sql sql_postgresql {
         password = "radpass"
 
         # Database table configuration for everything except Oracle
-        radius_db = "radius"
        radius_db = "radius"
 
        acct_table1 = "radacct"