From 50b37d4a27d3295a29afca2286f1a5a086142cec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 11:49:46 +0200 Subject: Adding upstream version 3.2.1+dfsg. Signed-off-by: Daniel Baumann --- src/tests/modules/sql/acct_1_update.unlang | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/tests/modules/sql/acct_1_update.unlang (limited to 'src/tests/modules/sql/acct_1_update.unlang') diff --git a/src/tests/modules/sql/acct_1_update.unlang b/src/tests/modules/sql/acct_1_update.unlang new file mode 100644 index 0000000..e566a4a --- /dev/null +++ b/src/tests/modules/sql/acct_1_update.unlang @@ -0,0 +1,30 @@ +# +# PRE: acct_0_start +# +sql.accounting +if (ok) { + test_pass +} +else { + test_fail +} + +update { + Tmp-Integer-0 := "%{sql:SELECT count(*) FROM radacct WHERE AcctSessionId = '00000001'}" +} +if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 1)) { + test_fail +} +else { + test_pass +} + +update { + Tmp-Integer-0 := "%{sql:SELECT acctsessiontime FROM radacct WHERE AcctSessionId = '00000001'}" +} +if (!&Tmp-Integer-0 || (&Tmp-Integer-0 != 30)) { + test_fail +} +else { + test_pass +} -- cgit v1.2.3