File tree Expand file tree Collapse file tree 3 files changed +49
-1
lines changed
maven-java/kalix-spring-boot-archetype/src/main/resources
src/it/java/__packageInPathFormat__ Expand file tree Collapse file tree 3 files changed +49
-1
lines changed Original file line number Diff line number Diff line change 12
12
<include >**/*</include >
13
13
</includes >
14
14
</fileSet >
15
+ <fileSet filtered =" true" >
16
+ <directory >src/it/java</directory >
17
+ <includes >
18
+ <include >**/*</include >
19
+ </includes >
20
+ </fileSet >
15
21
<fileSet filtered =" true" encoding =" UTF-8" >
16
22
<directory />
17
23
<includes >
Original file line number Diff line number Diff line change 278
278
</dependency >
279
279
<dependency >
280
280
<groupId >io.kalix</groupId >
281
- <artifactId >kalix-java -sdk-testkit</artifactId >
281
+ <artifactId >kalix-spring -sdk-testkit</artifactId >
282
282
<version >${kalix-sdk.version} </version >
283
283
<scope >test</scope >
284
284
</dependency >
296
296
<version >5.5.2</version >
297
297
<scope >test</scope >
298
298
</dependency >
299
+ <dependency >
300
+ <groupId >org.junit.jupiter</groupId >
301
+ <artifactId >junit-jupiter</artifactId >
302
+ <version >5.5.2</version >
303
+ <scope >test</scope >
304
+ </dependency >
299
305
300
306
</dependencies >
301
307
</project >
Original file line number Diff line number Diff line change
1
+ package $ {package };
2
+
3
+ import $ {package }.Main ;
4
+ import kalix .springsdk .testkit .KalixIntegrationTestKitSupport ;
5
+
6
+ import org .junit .jupiter .api .Assertions ;
7
+ import org .junit .jupiter .api .Test ;
8
+ import org .junit .runner .RunWith ;
9
+ import org .springframework .beans .factory .annotation .Autowired ;
10
+ import org .springframework .boot .test .context .SpringBootTest ;
11
+ import org .springframework .test .context .junit4 .SpringRunner ;
12
+ import org .springframework .web .reactive .function .client .WebClient ;
13
+
14
+
15
+ /**
16
+ * This is a skeleton for implmenting integration tests for a Kalix application built with the Spring SDK.
17
+ *
18
+ * This test will initiate a Kalix Proxy using testcontainers and therefore it's required to have Docker installed
19
+ * on your machine. This test will also start your Spring Boot application.
20
+ *
21
+ * Since this is an integration tests, it interacts with the application using a WebClient
22
+ * (already configured and provided automatically through injection).
23
+ */
24
+ @ RunWith (SpringRunner .class )
25
+ @ SpringBootTest (classes = Main .class )
26
+ public class IntegrationTest extends KalixIntegrationTestKitSupport {
27
+
28
+ @ Autowired
29
+ private WebClient webClient ;
30
+
31
+ @ Test
32
+ public void test () throws Exception {
33
+ // implement your integration tests here by calling your
34
+ // REST endpoints using the provided WebClient
35
+ }
36
+ }
You can’t perform that action at this time.
0 commit comments