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

Run tests on lambda #229

Open
7 tasks
slinkydeveloper opened this issue Dec 7, 2023 · 0 comments
Open
7 tasks

Run tests on lambda #229

slinkydeveloper opened this issue Dec 7, 2023 · 0 comments

Comments

@slinkydeveloper
Copy link
Collaborator

slinkydeveloper commented Dec 7, 2023

It would be nice to reuse this test suite as it is to run tests on lambda. So far the idea is:

  • gradle build will generate jars/zips for lambda
  • After packaging, gradle does the upload of the lambda zips/jars to s3. I guess we need unique ids for these s3 buckets, perhaps based on the test run.
  • When invoking the test phase, gradle injects some env variables with the name of the s3 bucket where the lambda zips/jars are
  • Using the AWS Java SDK we deploy lambdas during RestateDeployer.deploy(), using the s3 bucket as source code location
  • Execute the test
  • On RestateDeployer.undeploy() we remove the lambdas
  • After gradle test we remove the zips/jars from s3

We also probably need to tag the lambdas/s3 buckets with some well known tag like "e2e-tests", such that we can have a periodic cleanup of lambdas/s3 buckets on aws in case the test suite leaves some of them hanging around.

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