0e319c7ea3a3692466941bd2014baf14d59d6692
[freeradius.git] / src / tests / modules / sql_mysql / acct_2_stop.unlang
1 #
2 #  PRE: acct_1_update
3 #
4 sql.accounting
5 if (ok) {
6         test_pass
7 }
8 else {
9         test_fail
10 }
11
12 update {
13         Tmp-Integer-0 := "%{sql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000000'}"
14 }
15 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 1)) {
16         test_fail
17 }
18 else {
19         test_pass
20 }
21
22 update {
23         Tmp-Integer-0 := "%{sql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000000'}"
24 }
25 if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 60)) {
26         test_fail
27 }
28 else {
29         test_pass
30 }