-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Upgrade localstack and enable new services #1504
Conversation
Note: Some services need a newer Localstack version
Also extend basic tests to cover SQS
@@ -5,4 +5,5 @@ dependencies { | |||
|
|||
compileOnly 'com.amazonaws:aws-java-sdk-s3:1.11.479' | |||
testCompile 'com.amazonaws:aws-java-sdk-s3:1.11.479' | |||
testCompile 'com.amazonaws:aws-java-sdk-sqs:1.11.479' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added for new test
@@ -82,20 +82,11 @@ public LocalStackContainer withServices(Service... services) { | |||
final String address = getContainerIpAddress(); | |||
String ipAddress = address; | |||
try { | |||
// resolve IP address and use that as the endpoint so that path-style access is automatically used for S3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See javadocs - using an IP address for the endpoint ensures that the AWS SDK uses path-style access under the covers, which is the desired effect for the newer version of Localstack.
We use InetAddress.getByName(...)
to convert the container IP address to an IP regardless of its original form (e.g. could be localhost
, could already be an IP, could be a hostname).
The endpoint URL returned by this helper method is strictly for use by the Docker host.
STEPFUNCTIONS("stepsfunctions", 4585), | ||
CLOUDWATCHLOGS("cloudwatchlogs", 4586), | ||
STS("sts", 4592), | ||
IAM("iam", 4593); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reformatted; @trollinger74940 added new services here.
...s/localstack/src/main/java/org/testcontainers/containers/localstack/LocalStackContainer.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Replaces #1413
Fixes #1496