Skip to content

Commit 2dd0367

Browse files
committed
CCM-15633: Make contract tests fail if event schemas are out of date
1 parent bf62f3f commit 2dd0367

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

scripts/tests/contract.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ set -euo pipefail
44

55
cd "$(git rev-parse --show-toplevel)"
66

7-
# Ensure we have the latest schema package matching our version specifier
8-
npm update @nhsdigital/nhs-notify-event-schemas-status-published
7+
if [[ $(npm outdated @nhsdigital/nhs-notify-event-schemas-status-published) ]]; then
8+
echo "The provider schema package (@nhsdigital/nhs-notify-event-schemas-status-published) is outdated."
9+
echo "Please run \`npm update @nhsdigital/nhs-notify-event-schemas-status-published\` to update to the latest version and re-run."
10+
echo
11+
exit 1
12+
fi
913

1014
npm run test:contract

0 commit comments

Comments
 (0)