Skip to content

Commit 1d17031

Browse files
committed
Added Spring Boot MongoDB Testcontainer test
1 parent 814ab38 commit 1d17031

File tree

19 files changed

+703
-1
lines changed

19 files changed

+703
-1
lines changed

testing-movies-api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<relativePath/> <!-- lookup parent from repository -->
1010
</parent>
1111
<groupId>com.stacktips</groupId>
12-
<artifactId>testing-movies-api</artifactId>
12+
<artifactId>testing-spring-boot-mongodb-testcontainer</artifactId>
1313
<version>0.0.1-SNAPSHOT</version>
1414
<name>movies-api</name>
1515
<description>Demo project for Spring Boot</description>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
HELP.md
2+
target/
3+
!.mvn/wrapper/maven-wrapper.jar
4+
!**/src/main/**/target/
5+
!**/src/test/**/target/
6+
7+
### STS ###
8+
.apt_generated
9+
.classpath
10+
.factorypath
11+
.project
12+
.settings
13+
.springBeans
14+
.sts4-cache
15+
16+
### IntelliJ IDEA ###
17+
.idea
18+
*.iws
19+
*.iml
20+
*.ipr
21+
22+
### NetBeans ###
23+
/nbproject/private/
24+
/nbbuild/
25+
/dist/
26+
/nbdist/
27+
/.nb-gradle/
28+
build/
29+
!**/src/main/**/build/
30+
!**/src/test/**/build/
31+
32+
### VS Code ###
33+
.vscode/
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
plugins {
2+
id 'java'
3+
id 'org.springframework.boot' version '3.2.3'
4+
id 'io.spring.dependency-management' version '1.1.4'
5+
}
6+
7+
group = 'com.stacktips'
8+
version = '0.0.1-SNAPSHOT'
9+
10+
java {
11+
sourceCompatibility = '17'
12+
}
13+
14+
repositories {
15+
mavenCentral()
16+
}
17+
18+
dependencies {
19+
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
20+
implementation 'org.springframework.boot:spring-boot-starter-web'
21+
22+
testImplementation 'org.springframework.boot:spring-boot-starter-test'
23+
24+
testImplementation 'org.springframework.boot:spring-boot-testcontainers'
25+
testImplementation 'org.testcontainers:junit-jupiter'
26+
testImplementation 'org.testcontainers:mongodb'
27+
}
28+
29+
tasks.named('test') {
30+
useJUnitPlatform()
31+
}
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

testing-spring-boot-mongodb-testcontainer/gradlew

Lines changed: 249 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)