]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add simplified redundant test
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 30 Jul 2025 19:51:56 +0000 (12:51 -0700)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 30 Jul 2025 20:24:58 +0000 (13:24 -0700)
src/tests/keywords/redundant-load-balance-no-dups [new file with mode: 0644]

diff --git a/src/tests/keywords/redundant-load-balance-no-dups b/src/tests/keywords/redundant-load-balance-no-dups
new file mode 100644 (file)
index 0000000..e8e9186
--- /dev/null
@@ -0,0 +1,30 @@
+# PRE: if foreach
+#
+#  Redundant blocks.
+#
+#  Verify that only a single redundant child executes for redundant-load-balance
+#
+#  This is a regression test, where we saw multiple children execute.  This should
+#  in theory be caught by redundant-load-balance, but this is a simpler test to
+#  understand.
+#
+redundant-load-balance {
+       group {
+               request += {
+                       Reply-Message = "A thing"
+               }
+               ok
+       }
+       group {
+               request += {
+                       Reply-Message = "A second thing"
+               }
+               ok
+       }
+}
+
+if (!(%{Reply-Message[#]} == 1)) {
+       test_fail
+}
+
+success