When https://github.com/grafana/sm-k6-runner/pull/208 is merged, there is a theoretical possibility of the logs and/or metrics returned by the runner to be malformed, for example is k6 is killed while it is writing its output.
This PR adds tests for that case, ensuring that:
Receiving borked metrics triggers an error
Receiving borked metrics still causes logs to be sent, and the execution to be marked as failure.
Another step towards https://github.com/grafana/synthetic-monitoring-app/issues/835.
When https://github.com/grafana/sm-k6-runner/pull/208 is merged, there is a theoretical possibility of the logs and/or metrics returned by the runner to be malformed, for example is k6 is killed while it is writing its output.
This PR adds tests for that case, ensuring that: