ONSdigital / dp-cli

A helpful command line tool to make Digital Publishing developers' lives better
MIT License
3 stars 1 forks source link

Fail test suite when there are pending or undefined steps #147

Closed jmgq closed 7 months ago

jmgq commented 7 months ago

What

Set Godog to strict mode, to avoid the issues described in https://github.com/ONSdigital/dp-legacy-cache-api/pull/21.

Currently, when a Godog step is missing, a warning is issued, and a step (and scenario) is marked as undefined when running the component tests. However, the exit code is still 0, which means that the pipeline will not fail when a step is undefined. This means that a malformed step could inadvertently make a whole scenario to go untested, and the Component Test pipeline job would still pass.

As part of this change, we're changing this behaviour, so that the exit code is not 0 when a step is pending or undefined.

How to review

Ensure that the templates are not broken.

Who can review

Anyone.