Accounting query selection is now driven by the section being processed
rather than expansion of a reference which included the Acct-Status-Type
%sql("${delete_from_radacct} '00000000'")
-sql.accounting
-if (ok) {
- test_pass
-}
-else {
+sql.accounting.start
+if !(ok) {
test_fail
}
if (%sql("SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000000'") != "0") {
test_fail
}
+
+test_pass
#
# PRE: acct_0_start
#
-sql.accounting
-if (ok) {
- test_pass
-}
-else {
+sql.accounting.interim-update
+if !(ok) {
test_fail
}
if (%sql("SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000001'") != "30") {
test_pass
}
+
+test_pass
#
# PRE: acct_1_update
#
-sql.accounting
-if (ok) {
- test_pass
-}
-else {
+sql.accounting.stop
+if !(ok) {
test_fail
}
if(%sql("SELECT AcctTerminateCause FROM radacct WHERE AcctSessionId = '00000002'") != 'User-Request') {
test_fail
}
+
+test_pass
#
# Insert the Accounting-Request start
#
-sql.accounting
-if (ok) {
- test_pass
-}
-else {
+sql.accounting.start
+if !(ok) {
test_fail
}
#
&Connect-Info = 'updated'
-sql.accounting
-if (ok) {
- test_pass
-}
-else {
+sql.accounting.start
+if !(ok) {
test_fail
}
if (%sql("SELECT connectinfo_start FROM radacct WHERE AcctSessionId = '00000003'") != 'updated') {
test_fail
}
+
+test_pass
#
%sql("${delete_from_radacct} '00000004'")
-sql.accounting
+sql.accounting.interim-update
if (!ok) {
test_fail
}