-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds testcontainers to sns and ses projects
- Loading branch information
1 parent
d469eaa
commit 4eb30bd
Showing
8 changed files
with
69 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
aws-ses-project/src/test/java/com/example/awsspring/TestSESApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.example.awsspring; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.test.context.TestConfiguration; | ||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection; | ||
import org.springframework.context.annotation.Bean; | ||
import org.testcontainers.containers.localstack.LocalStackContainer; | ||
import org.testcontainers.containers.output.Slf4jLogConsumer; | ||
import org.testcontainers.utility.DockerImageName; | ||
|
||
@Slf4j | ||
@TestConfiguration(proxyBeanMethods = false) | ||
public class TestSESApplication { | ||
|
||
@Bean | ||
@ServiceConnection | ||
LocalStackContainer localStackContainer() { | ||
LocalStackContainer localStackContainer = | ||
new LocalStackContainer( | ||
DockerImageName.parse("localstack/localstack").withTag("3.3.0")); | ||
localStackContainer.start(); | ||
Slf4jLogConsumer logConsumer = new Slf4jLogConsumer(log); | ||
localStackContainer.followOutput(logConsumer); | ||
return localStackContainer; | ||
} | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.from(SESApplication::main).with(TestSESApplication.class).run(args); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
aws-ses-project/src/test/java/com/example/awsspring/common/LocalStackConfig.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters