-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Review Testing Strategy for Instance Scheduler Module #8161
Comments
Following an investigation into several testing options—including creating new Go tests and adding a Lambda function unit test to replicate the initial failure cases (see test suite) - I found that the SAM CLI, already being used for build and validation, can also invoke AWS Lambda functions locally. This allowed us to leverage the SAM local invoke command for local Lambda testing. Examples of SAM invoke tests: A key issue I encountered was that GitHub Actions reports a successful exit code for the SAM CLI command even if the Lambda invocation fails (similar issue detailed here: GitHub issue). To address this, I implemented a workaround that captures the SAM output as a variable and checks for errors using grep. |
above PR merged in and checked tests are running correctly. moving over for review |
I've reviewed this and am happy it's complete. |
User Story
As a MP Engineer
I expect the tests on the Instance Scheduler module to be representative of the environment that it will be run in
So that i have confidence when making changes/maintenance to the module
Value / Purpose
We recently made some maintenance updates to the container build in the instance scheduler module and the status checks/unit tests passed successfully.
We subsequently found that there was an issue with the container when it was run in the unit tests for the lambda function module as can be seen in this example
The purpose of this story is to investigate why the tests on the instance scheduler repo are not replicant of the ones in the lambda function module as the container build updates which were made caused the instance scheduler to fail the next time it was triggered.
Useful Contacts
@richgreen-moj @ASTRobinson @connormaglynn
Additional Information
No response
Definition of Done
The text was updated successfully, but these errors were encountered: