Skip to content
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

Improve tests of constructs #99

Open
emileten opened this issue Feb 23, 2024 · 0 comments
Open

Improve tests of constructs #99

emileten opened this issue Feb 23, 2024 · 0 comments

Comments

@emileten
Copy link
Contributor

emileten commented Feb 23, 2024

Now that we finally having deployment tests that work, here are ideas to improve them.

  • For now we're essentially just testing that we're writing proper CDK code that produces cloud formation templates that we can use to deploy-destroy without bugs. We're not testing any of the deployed applications (initially I had planned to include that, i.e ingest some test metadata and test usage of the STAC api, the raster API, etc, but other challenges piled up and I wanted to get something out of the door so I simplified the tests to just a deploy-destroy process). Should we add actual tests of the apps at some point ? Ideally it shouldn't contain too much application logic (these tests should live in the actual app repositories, titiler-pgstac, etc). Maybe simple checks that the APIs are reachable ?

  • We only have one test case that's quite specific : no STAC ingestor, STAC browser or bastion host, the DB is in a public subnet and allows connections from any IP (only barrier is the password), application lambdas are not placed in VPCs. Should we add different configuration cases in the test deployments ?

  • Now that I am writing about this, I am thinking there must be some framework we can reuse for doing real world testing of our constructs, since there are a lot of constructs being developed out there. Just stumbled upon this, not sure if it does what we want. I think it's meant to be use with this CLI tool https://github.com/aws/aws-cdk/tree/main/packages/%40aws-cdk/integ-runner developed by AWS for their own constructs repository, which essentially does what we're doing (try to synth, deploy and destroy templates resulting from constructs) but in a more fancy way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant