From: Arran Cudbard-Bell Date: Tue, 5 Mar 2024 16:38:07 +0000 (-0600) Subject: Test cancellations within subrequests X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee7b1919cce697b00781cc28b429c1b683289082;p=thirdparty%2Ffreeradius-server.git Test cancellations within subrequests --- diff --git a/src/tests/keywords/subrequest-cancel b/src/tests/keywords/subrequest-cancel new file mode 100644 index 00000000000..710cbf3a92d --- /dev/null +++ b/src/tests/keywords/subrequest-cancel @@ -0,0 +1,21 @@ +# Cancel in subrequest +subrequest Access-Request { + &parent.Tmp-String-0 := 'testing' + + # Immediately cancel the subrequest + %cancel(0) + + &parent.Tmp-String-1 := 'should not see me' + + # We should've been cancelled here + test_fail +} + +if (!(&Tmp-String-0 == 'testing')) { + test_fail +} + +if (&Tmp-String-1 == 'should not see me') { + test_fail +} +success