From 246fd3059445d346aa30fb45649e2eb435756157 Mon Sep 17 00:00:00 2001 From: samugi Date: Wed, 3 Jan 2024 13:58:21 +0100 Subject: [PATCH] fix(ci): test scheduler busted helper We use `busted.subscribe` to override the output handlers with a callback. To implement the mediator pattern, Busted uses [mediator_lua](https://github.com/Olivine-Labs/mediator_lua). The second value returned by the subscription callback is used to decide whether to continue execution of other subscribers. Since we only return `nil`, the test failure was not handled to exit with the right status and failing tests were exiting with `0`. This commit changes the return value of the callback to: `nil, true` so that the original callback is executed to handle the test result and return the correct exit status. --- spec/busted-ci-helper.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/busted-ci-helper.lua b/spec/busted-ci-helper.lua index 699d894dfa22..be9e84ea145b 100644 --- a/spec/busted-ci-helper.lua +++ b/spec/busted-ci-helper.lua @@ -61,6 +61,7 @@ if busted_event_path then end sock:send(cjson.encode({ event = event[1] .. (event[2] and ":" .. event[2] or ""), args = args }) .. "\n") + return nil, true --continue end) end end