]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add "success" policy
authorAlan T. DeKok <aland@freeradius.org>
Wed, 13 Sep 2017 14:10:32 +0000 (10:10 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 13 Sep 2017 15:57:56 +0000 (11:57 -0400)
src/tests/keywords/unit_test_module.conf

index 14483dff01cae26aec3ec6cc3d7dc3f37e1a35c7..dd73d94b897a0299bda5e6a01ffa4aa5a025df34 100644 (file)
@@ -78,6 +78,17 @@ policy {
        with.dots {
                ok
        }
+
+       #
+       #  Set the test to successful, but only if there are no failures.
+       #
+       success {
+               if (!&reply:Filter-Id) {
+                       update reply {
+                               Filter-Id := "filter"
+                       }
+               }
+       }
 }
 
 instantiate {