Skip to content

Commit

Permalink
Add local development support
Browse files Browse the repository at this point in the history
  • Loading branch information
sivaprasadreddy committed Aug 3, 2023
1 parent f5fb018 commit fb9dd2c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
6 changes: 4 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.1'
id 'io.spring.dependency-management' version '1.1.0'
id 'org.springframework.boot' version '3.1.2'
id 'io.spring.dependency-management' version '1.1.2'
id 'com.diffplug.spotless' version "6.18.0"
}

Expand Down Expand Up @@ -29,7 +29,9 @@ dependencies {
implementation 'io.awspring.cloud:spring-cloud-aws-starter-s3'
implementation 'io.awspring.cloud:spring-cloud-aws-starter-sqs'

testImplementation 'org.springframework.boot:spring-boot-devtools'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.boot:spring-boot-testcontainers'
testImplementation 'org.testcontainers:junit-jupiter'
testImplementation 'org.testcontainers:localstack'
testImplementation 'org.awaitility:awaitility'
Expand Down
12 changes: 11 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.1</version>
<version>3.1.2</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.testcontainers</groupId>
Expand All @@ -34,11 +34,21 @@
<groupId>io.awspring.cloud</groupId>
<artifactId>spring-cloud-aws-starter-sqs</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-testcontainers</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
Expand Down
9 changes: 1 addition & 8 deletions src/test/java/com/testcontainers/demo/TestApplication.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.testcontainers.demo;

import static org.testcontainers.containers.localstack.LocalStackContainer.Service.S3;
import static org.testcontainers.containers.localstack.LocalStackContainer.Service.SQS;

import java.util.UUID;
import org.springframework.boot.SpringApplication;
import org.testcontainers.containers.localstack.LocalStackContainer;
Expand Down Expand Up @@ -32,11 +29,7 @@ static void setup() {
System.setProperty("spring.cloud.aws.credentials.access-key", container.getAccessKey());
System.setProperty("spring.cloud.aws.credentials.secret-key", container.getSecretKey());
System.setProperty(
"spring.cloud.aws.s3.endpoint",
container.getEndpointOverride(S3).toString());
System.setProperty(
"spring.cloud.aws.sqs.endpoint",
container.getEndpointOverride(SQS).toString());
"spring.cloud.aws.endpoint", container.getEndpoint().toString());
} catch (Exception e) {
throw new RuntimeException(e);
}
Expand Down

0 comments on commit fb9dd2c

Please sign in to comment.