fix: enable S3 integration tests to be configured via environment vars #1966
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
tl;dr: this allows the following:
AWS_ENDPOINT_URL=none AWS_ACCESS_KEY_ID=KEY_ID AWS_SECRET_ACCESS_KEY=SECRET AWS_REGION=eu-central-1 cargo test
This allows integration tests for AWS/S3 to talk to a real AWS environment instead of localstack via setting a bunch of environment variables. This didn't previously work because
AWS_ENDPOINT_URL
must be unset for "normal" AWS (or I didn't find a validendpoint
setting for this). When not running against localstack, some operations, including DynamoDb table creation, are notably slower, and it's necessary to poll thedescribe-table
API until the table is ready to be used.AWS_ENDPOINT_URL=none
is a special value that instructs the test to run without an endpoint, talking to AWS proper.I need this because
localstack
doesn't seem to emitProvisionedThroughputExceeded
, so I have difficulties testing for correct retry / backoff behavior.