]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
SQL tests are independent
authorNick Porter <nick@portercomputing.co.uk>
Fri, 9 May 2025 13:14:14 +0000 (14:14 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Fri, 9 May 2025 13:30:21 +0000 (14:30 +0100)
So the PRE entry won't actually insert the record which we want to
update.

src/tests/modules/sql/acct_1_update.attrs
src/tests/modules/sql/acct_1_update.unlang

index a1d2eaad287ccd4705722dc76e0eaebde6c92797..1b834c2dd477f35380191a6addcc045aaa31d3f5 100644 (file)
@@ -14,7 +14,7 @@ Acct-Output-Octets = 10
 Acct-Session-Id = '00000001'
 Acct-Unique-Session-Id = '00000001'
 Acct-Authentic = RADIUS
-Acct-Session-Time = 30
+Acct-Session-Time = 0
 Acct-Input-Packets = 10
 Acct-Output-Packets = 10
 Acct-Input-Gigawords = 1
index 5bf5915dc112889daafdbafd23070470399b08a4..ba327e09a3420db685eb3ca9349b64a5f31c8de4 100644 (file)
@@ -1,6 +1,15 @@
 #
-#  PRE: acct_0_start
+#  The SQL tests are independent - so we fake a "Start" before running the I-U
 #
+%sql("${delete_from_radacct} '00000001'")
+
+sql.accounting.start
+if !(ok) {
+       test_fail
+}
+
+Acct-Session-Time = 30
+
 sql.accounting.interim-update
 if !(ok) {
        test_fail