We believe testing is the backbone of the awsplace project. Instead of just hoping things work, we check our code at multiple levels—starting from small unit tests, up to testing our CDK infrastructure, and finally running everything through our CI/CD pipelines.
Here’s a look at how we organized our tests:
| Sub-section | Description |
|---|---|
| 5.6.1 CDK Infrastructure Testing | We use Jest to generate real CloudFormation templates and make sure our infrastructure matches what we expect |
| 5.6.2 Application Testing | Unit tests for our Go code, plus integration tests for PostgreSQL and our DynamoDB/S3 setup |
| 5.6.3 CI/CD Pipeline Validation | Our GitHub Actions and GitLab CI workflows that automatically check every deployment |
When it comes to testing, our core rule is to test the contract, not the implementation. Instead of writing mock tests for every little CDK resource, we take a more practical approach:
By testing the real output, we catch actual deployment bugs that simple mocking would completely miss.