-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Allow using LocalStackContainer with AWS SDK v2 #1442 #2579
Conversation
...s/localstack/src/main/java/org/testcontainers/containers/localstack/LocalStackContainer.java
Outdated
Show resolved
Hide resolved
@musketyr do you know if AWS SDK 1 and 2 can co-exist on the same classpath? |
final software.amazon.awssdk.services.s3.model.Bucket bucket = buckets.get(0); | ||
|
||
assertEquals("The created bucket has the right name", "foo", bucket.name()); | ||
assertEquals("The created bucket has the right name", "foo", bucket.name()); |
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.
assertEquals("The created bucket has the right name", "foo", bucket.name()); | |
assertEquals("The created bucket has the right name", "foo", bucket.name()); |
duplicate
@@ -85,6 +92,34 @@ public void s3TestOverBridgeNetwork() throws IOException { | |||
assertEquals("The object can be retrieved", "baz", content); | |||
} | |||
|
|||
@Test | |||
public void s3TestOverBridgeNetworkV2() { |
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.
- I think test's name is a bit too specific
- could you please reduce the test to the minimum, so that it only tests that SDK v2 works fine?
LGTM - will merge. Thanks for the contribution @musketyr! |
This PR exposes the generated
URI
from thegetEndpointConfiguration(Service)
methodso it can be used by AWS SDK v2 methods.
It also exposes the default access key, secret key and region which is also required by the clients.
AWS SDK v2 users will be able to use the container without additional changes as follows: