unstable jenkins call is being mocked by jenkins-spock (as it is supposed to) but by doing this the currentBuild.status/currentBuild.result variable is not updated when unstable is called so any pipeline script that depends on this mechanism will not be able to check if the script worked or not. In my case, I catch all exceptions so the noExceptionThrown() for the then block is not enougth.
The request is to provide a way to keep the behaviour of unstable or at least keep the update of theese variables
Benefits
As I mentioned, allow the update of the currentBuild.status/currentBuild.result variables during test and check them to assert the correct execution of the test
Desired Behavior
unstable jenkins call is being mocked by jenkins-spock (as it is supposed to) but by doing this the currentBuild.status/currentBuild.result variable is not updated when unstable is called so any pipeline script that depends on this mechanism will not be able to check if the script worked or not. In my case, I catch all exceptions so the noExceptionThrown() for the then block is not enougth.
The request is to provide a way to keep the behaviour of unstable or at least keep the update of theese variables
Benefits
As I mentioned, allow the update of the currentBuild.status/currentBuild.result variables during test and check them to assert the correct execution of the test
Hope you can help. Thank you!