File tree 4 files changed +14
-1
lines changed
main/java/dev/aws101/config
4 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ dependencies {
42
42
testImplementation(' org.springframework.boot:spring-boot-starter-test' ) {
43
43
exclude group : ' org.junit.vintage' , module : ' junit-vintage-engine'
44
44
}
45
- def testcontainersVersion = ' 1.14.3 '
45
+ def testcontainersVersion = ' 1.15.0-rc2 '
46
46
testCompile(' org.testcontainers:localstack:' + testcontainersVersion)
47
47
testCompile(' org.testcontainers:junit-jupiter:' + testcontainersVersion)
48
48
}
Original file line number Diff line number Diff line change @@ -50,6 +50,11 @@ public NotificationMessagingTemplate notificationMessagingTemplate(AmazonSNS ama
50
50
}
51
51
52
52
@ Bean
53
+ @ ConditionalOnProperty (
54
+ value = "custom.local-sns-enabled" ,
55
+ havingValue = "false" ,
56
+ matchIfMissing = true
57
+ )
53
58
public AmazonSNS amazonSNS (AWSCredentialsProvider awsCredentialsProvider ) {
54
59
AwsClientBuilder .EndpointConfiguration endpointConfiguration = null ;
55
60
if (endpoint != null ) {
Original file line number Diff line number Diff line change 6
6
import com .amazonaws .services .sqs .AmazonSQSAsyncClientBuilder ;
7
7
import org .springframework .boot .test .context .TestConfiguration ;
8
8
import org .springframework .context .annotation .Bean ;
9
+ import org .springframework .context .annotation .Primary ;
9
10
10
11
import static dev .aws101 .TodoApplicationTests .localStack ;
11
12
import static org .testcontainers .containers .localstack .LocalStackContainer .Service .SNS ;
15
16
public class AwsTestConfig {
16
17
17
18
@ Bean
19
+ @ Primary
18
20
public AmazonSQSAsync amazonSQS () {
19
21
return AmazonSQSAsyncClientBuilder .standard ()
20
22
.withCredentials (localStack .getDefaultCredentialsProvider ())
@@ -23,6 +25,7 @@ public AmazonSQSAsync amazonSQS() {
23
25
}
24
26
25
27
@ Bean
28
+ @ Primary
26
29
public AmazonSNS amazonSNS () {
27
30
return AmazonSNSClientBuilder
28
31
.standard ()
Original file line number Diff line number Diff line change @@ -24,5 +24,10 @@ spring:
24
24
usernameAttribute : username
25
25
26
26
custom :
27
+ security :
28
+ enabled : false
27
29
sharing-queue : test-todo-sharing
28
30
updates-topic : test-todo-updates
31
+ websocket-url : ws://localhost:8080/websocket
32
+ external-url : ${EXTERNAL_URL:#{null}}
33
+ local-sns-enabled : true
You can’t perform that action at this time.
0 commit comments