Skip to content

Stop making a new S3 bucket for every integration tests run #127

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

Merged
merged 2 commits into from
Apr 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/integration/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ provider:
DD_API_KEY: ${env:DD_API_KEY}
lambdaHashingVersion: 20201221
timeout: 15
deploymentBucket:
name: integration-tests-deployment-bucket
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you link to docs for deploymentBucket? I don't see where it sets up the 1 day lifecycle policy by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lifecycle policy is a setting in AWS. I hardcoded this bucket name in the test, and then configured the bucket in AWS to delete all objects older than one day.

Does that answer your question or do you still want to see docs for something?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, we're good. I misunderstood you, I thought deploymentBucket was setting the lifecycle policy automatically. It looks like it automatically prunes artifacts once it has more than 5 artifacts, which is pretty good in and of itself. https://www.serverless.com/framework/docs/providers/aws/guide/serverless.yml/

iam:
# IAM permissions require that all functions are deployed with this role
role: "arn:aws:iam::601427279990:role/serverless-integration-test-lambda-role"
Expand Down