Skip to content

Commit 744e98f

Browse files
committed
Build refactor
1 parent 3fe1a20 commit 744e98f

7 files changed

Lines changed: 30 additions & 6 deletions

File tree

build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,18 @@ dependencies {
3434

3535
}
3636

37-
task buildZip(type: Zip) {
37+
tasks.register('buildZip', Zip) {
3838
from compileJava
3939
from processResources
4040
into('lib') {
4141
from(configurations.compileClasspath)
4242
}
4343
}
4444

45-
build.dependsOn buildZip
45+
tasks.register('buildNativeZip', Zip) {
46+
from nativeCompile.outputFile
47+
from "src/main/shell/bootstrap"
48+
}
4649

4750
tasks.named('test') {
4851
useJUnitPlatform()

src/main/resources/application.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,4 @@ spring:
55
mongodb:
66
repositories:
77
type: NONE
8-
9-
logging:
10-
level:
11-
org.springframework.data.mongodb.core: DEBUG
8+
uri:

src/test/http/customer/get.http

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
GET /test/customer
2+
Host: mj4itc9sde.execute-api.eu-central-1.amazonaws.com
3+
protocol: https
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
GET /test/customer/6752bb53e2d1f541be8af23f
2+
Host: mj4itc9sde.execute-api.eu-central-1.amazonaws.com
3+
protocol: https

src/test/http/customer/post.http

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
POST https://mj4itc9sde.execute-api.eu-central-1.amazonaws.com/test/customer
2+
Host: mj4itc9sde.execute-api.eu-central-1.amazonaws.com
3+
protocol: https
4+
content-type: application/json
5+
6+
{
7+
"firstName": "John",
8+
"lastName": "Doe"
9+
}

src/test/java/com/example/springlambda/SpringLambdaApplicationTests.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,19 @@
22

33
import org.junit.jupiter.api.Test;
44
import org.springframework.boot.test.context.SpringBootTest;
5+
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
6+
import org.testcontainers.containers.MongoDBContainer;
7+
import org.testcontainers.junit.jupiter.Container;
8+
import org.testcontainers.junit.jupiter.Testcontainers;
59

610
@SpringBootTest
11+
@Testcontainers
712
class SpringLambdaApplicationTests {
813

14+
@Container
15+
@ServiceConnection
16+
private static final MongoDBContainer MONGO_DB_CONTAINER = new MongoDBContainer();
17+
918
@Test
1019
void contextLoads() {
1120
}

0 commit comments

Comments
 (0)