I am running the following code in a ci/cd pipeline:
sls offline start --showDuration --exec "npm run int-test"
However, when a test fails, the ci/cd pipeline does not fail because the failure of a test is not trickling down to the script, which is serverless offline exec is not passing the exit code.
I could get past this if I had a way of shutting down serverless offline in the pipeline. I could start the server, run tests, shut down the server. However, I cannot find a stop command for serverless offline, and Ctrl-C is no an option cause I am running in the pipeline, not on a terminal.
Suggestions on getting either of these solutions to work? Right now my pipeline thinks my tests are passing...