terraform-aws-gitlab-runner
terraform-aws-gitlab-runner copied to clipboard
Add unit tests
trafficstars
Currently we provindig a few lamba's as part of the module. However the code is simple, it is good practice to have unit tests. Unit helps to check the code in isolation, without the need to deploy the lambda. Unit test will help to check dependency changes and PR in an automate way.
I think we should setup tests with pytest to test the Lambda's in isolation, including expection behavior. Calls to external API's such as AWS SDK (via boto3). can be mocked. Test should focus on checking the internal behaviror.
Unit tests for the module are still missing and would improve the quality of the project. #632 already started to implement tests.
Things to test:
- #711 Variable names are taken as configuration keys in the
config.toml