Skip to content

mateusmachado/testcontainers-java-module-localstack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TestContainers LocalStack AWS testing module

Testcontainers module for the Atlassian's LocalStack, 'a fully functional local AWS cloud stack'.

See testcontainers.org for more information about Testcontainers.

Usage example

Running LocalStack as a stand-in for AWS S3 during a test:

public class SomeTest {

    @Rule
    public LocalStackContainer localstack = new LocalStackContainer()
            .withServices(S3);
    
    @Test
    public void someTestMethod() {
        AmazonS3 s3 = AmazonS3ClientBuilder
                        .standard()
                        .withEndpointConfiguration(localstack.getEndpointConfiguration(S3))
                        .withCredentials(localstack.getDefaultCredentialsProvider())
                        .build();
        
                s3.createBucket("foo");
                s3.putObject("foo", "bar", "baz");

Dependency information

Maven

<dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>localstack</artifactId>
    <version>1.6.0</version>
</dependency>

Gradle

compile group: 'org.testcontainers', name: 'localstack', version: '1.4.3'

License

See LICENSE.

Copyright

Copyright (c) 2015 - 2017 Richard North and other authors.

See AUTHORS for contributors.

About

Testcontainers module for Atlassian Localstack - local AWS testing

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 41.4%
  • Shell 33.8%
  • Batchfile 24.8%