Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add integration test script #77

Merged
merged 2 commits into from
Feb 28, 2025
Merged

Add integration test script #77

merged 2 commits into from
Feb 28, 2025

Conversation

gregtyler
Copy link
Contributor

@gregtyler gregtyler commented Feb 28, 2025

Purpose

Add an integration test script to be run in the pipeline and check the application works correctly.

Fixes SSM-72 #minor

Approach

Starts up the application and sends example files to it to check the are correctly parsed.

For files which create cases, it also checks that a message has been added to the SQS queue.

I updated the Sirius mock to generate unique UIDs on each request, which is used to ensure the SQS message relates to the most recent file.

Fixed a few issues with our existing test files.

Removed LPA002 and LPA002R from NewCaseDocuments, as they should be supplied alongside LP2s which create the case.

Learning

Bash really mangled the output of the SQS message, stripping away slashes that made it invalid JSON. I avoided this in the end by doing all the manipulation in one jq statement, but it was a sticking point when I had a different approach.

GitHub Actions doesn't support v1 docker-compose so I had to update our scripts to v2 docker compose

I needed to update the localstack healthcheck script because it was reporting as healthy too early

Checklist

  • I have performed a self-review of my own code
  • I have added relevant logging with appropriate levels to my code
    • N/A
  • I have updated documentation where relevant
    • N/A
  • I have added tests to prove my work

@gregtyler gregtyler requested a review from a team as a code owner February 28, 2025 11:17
@gregtyler gregtyler force-pushed the SSM-72-add-test-script branch 5 times, most recently from 232ddc2 to 055b39c Compare February 28, 2025 12:38
@gregtyler gregtyler mentioned this pull request Feb 28, 2025
4 tasks
@sixdaysandy sixdaysandy force-pushed the SSM-72-add-test-script branch 3 times, most recently from fd4f6be to 866b52d Compare February 28, 2025 13:42
Starts up the application and sends example files to it to check the are correctly parsed.

For files which create cases, it also checks that a message has been added to the SQS queue.

I updated the Sirius mock to generate unique UIDs on each request, which is used to ensure the SQS message relates to the most recent file.

Fixed a few issues with our existing test files.

Removed LPA002 and LPA002R from `NewCaseDocuments`, as they should be supplied alongside LP2s which create the case.

Fixes SSM-72 #minor
Check resources have been created, not just that the server started up.

#patch
@sixdaysandy sixdaysandy force-pushed the SSM-72-add-test-script branch from 866b52d to 0ac225d Compare February 28, 2025 14:01
@gregtyler gregtyler merged commit 830cc04 into main Feb 28, 2025
20 checks passed
@gregtyler gregtyler deleted the SSM-72-add-test-script branch February 28, 2025 14:37
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants