diff options
Diffstat (limited to 'src/tests/modules/sql/acct_0_start.unlang')
-rw-r--r-- | src/tests/modules/sql/acct_0_start.unlang | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/tests/modules/sql/acct_0_start.unlang b/src/tests/modules/sql/acct_0_start.unlang new file mode 100644 index 0000000..64921b1 --- /dev/null +++ b/src/tests/modules/sql/acct_0_start.unlang @@ -0,0 +1,40 @@ +# +# Clear out old data +# +update { + Tmp-String-0 := "%{sql:DELETE FROM radacct WHERE AcctSessionId = '00000000'}" +} +if (!&Tmp-String-0) { + test_fail +} +else { + test_pass +} + +sql.accounting +if (ok) { + test_pass +} +else { + test_fail +} + +update { + Tmp-Integer-0 := "%{sql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000000'}" +} +if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 1)) { + test_fail +} +else { + test_pass +} + +update { + Tmp-Integer-0 := "%{sql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000000'}" +} +if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 0)) { + test_fail +} +else { + test_pass +} |