terraform-aws-gitlab-runner icon indicating copy to clipboard operation
terraform-aws-gitlab-runner copied to clipboard

Add unit tests

Open kayman-mk opened this issue 2 years ago • 0 comments
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

kayman-mk avatar Feb 27 '23 19:02 kayman-mk