Skip to content

Commit 9c8b809

Browse files
committed
Re-enabled sampples
1 parent 32083ef commit 9c8b809

File tree

12 files changed

+81
-82
lines changed

12 files changed

+81
-82
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
<module>spring-cloud-function-web</module>
181181
<module>spring-cloud-starter-function-web</module>
182182
<module>spring-cloud-starter-function-webflux</module>
183-
<!-- <module>spring-cloud-function-samples</module> -->
183+
<module>spring-cloud-function-samples</module>
184184
<!-- <module>spring-cloud-function-deployer</module> -->
185185
<module>spring-cloud-function-adapters</module>
186186
<module>spring-cloud-function-integration</module>
@@ -223,7 +223,7 @@
223223
<module>spring-cloud-function-web</module>
224224
<module>spring-cloud-starter-function-web</module>
225225
<module>spring-cloud-starter-function-webflux</module>
226-
<!-- <module>spring-cloud-function-samples</module> -->
226+
<module>spring-cloud-function-samples</module>
227227
<!-- <module>spring-cloud-function-deployer</module> -->
228228
<module>spring-cloud-function-adapters</module>
229229
<module>spring-cloud-function-integration</module>

spring-cloud-function-samples/function-sample-gcp-http/pom.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,21 @@
5757
<version>1.0.0-alpha-2-rc5</version>
5858
<scope>test</scope>
5959
</dependency>
60+
<dependency>
61+
<groupId>org.springframework.boot</groupId>
62+
<artifactId>spring-boot-resttestclient</artifactId>
63+
<scope>test</scope>
64+
</dependency>
65+
66+
<dependency>
67+
<groupId>org.springframework.boot</groupId>
68+
<artifactId>spring-boot-webmvc-test</artifactId>
69+
<scope>test</scope>
70+
</dependency>
71+
<dependency>
72+
<groupId>org.springframework.boot</groupId>
73+
<artifactId>spring-boot-webtestclient</artifactId>
74+
</dependency>
6075
</dependencies>
6176

6277
<build>

spring-cloud-function-samples/function-sample-gcp-http/src/test/java/com/example/FunctionSampleGcpIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import java.io.IOException;
2020

21-
import org.springframework.boot.web.server.test.client.TestRestTemplate;
21+
import org.springframework.boot.resttestclient.TestRestTemplate;
2222

2323
import static org.assertj.core.api.Assertions.assertThat;
2424

spring-cloud-function-samples/function-sample-pojo/pom.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,21 @@
4646
<artifactId>spring-boot-starter-test</artifactId>
4747
<scope>test</scope>
4848
</dependency>
49+
<dependency>
50+
<groupId>org.springframework.boot</groupId>
51+
<artifactId>spring-boot-resttestclient</artifactId>
52+
<scope>test</scope>
53+
</dependency>
54+
55+
<dependency>
56+
<groupId>org.springframework.boot</groupId>
57+
<artifactId>spring-boot-webmvc-test</artifactId>
58+
<scope>test</scope>
59+
</dependency>
60+
<dependency>
61+
<groupId>org.springframework.boot</groupId>
62+
<artifactId>spring-boot-webtestclient</artifactId>
63+
</dependency>
4964
</dependencies>
5065

5166
<dependencyManagement>

spring-cloud-function-samples/function-sample-pojo/src/test/java/com/example/SampleApplicationMvcTests.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@
2121
import org.junit.jupiter.api.Test;
2222

2323
import org.springframework.beans.factory.annotation.Autowired;
24+
import org.springframework.boot.resttestclient.TestRestTemplate;
25+
import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureTestRestTemplate;
2426
import org.springframework.boot.test.context.SpringBootTest;
2527
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
26-
import org.springframework.boot.web.server.test.client.TestRestTemplate;
2728
import org.springframework.http.MediaType;
2829
import org.springframework.http.RequestEntity;
2930
import org.springframework.http.ResponseEntity;
@@ -34,6 +35,7 @@
3435
* @author Dave Syer
3536
*/
3637
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
38+
@AutoConfigureTestRestTemplate
3739
public class SampleApplicationMvcTests {
3840

3941
@Autowired

spring-cloud-function-samples/function-sample-pojo/src/test/java/com/example/SampleApplicationTests.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@
2222
import org.junit.jupiter.api.BeforeEach;
2323
import org.junit.jupiter.api.Test;
2424

25+
import org.springframework.boot.resttestclient.TestRestTemplate;
26+
import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureTestRestTemplate;
2527
import org.springframework.boot.test.context.SpringBootTest;
2628
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
27-
import org.springframework.boot.web.server.test.LocalServerPort;
28-
import org.springframework.boot.web.server.test.client.TestRestTemplate;
29+
import org.springframework.boot.test.web.server.LocalServerPort;
30+
import org.springframework.boot.webtestclient.autoconfigure.AutoConfigureWebTestClient;
2931
import org.springframework.http.HttpEntity;
3032
import org.springframework.http.HttpHeaders;
3133
import org.springframework.http.MediaType;
@@ -39,6 +41,7 @@
3941
* @author Oleg Zhurakousky
4042
*/
4143
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
44+
@AutoConfigureTestRestTemplate
4245
public class SampleApplicationTests {
4346

4447
private HttpHeaders headers;

spring-cloud-function-samples/function-sample-spring-integration/pom.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,21 @@
4545
<artifactId>spring-boot-starter-test</artifactId>
4646
<scope>test</scope>
4747
</dependency>
48+
<dependency>
49+
<groupId>org.springframework.boot</groupId>
50+
<artifactId>spring-boot-resttestclient</artifactId>
51+
<scope>test</scope>
52+
</dependency>
53+
54+
<dependency>
55+
<groupId>org.springframework.boot</groupId>
56+
<artifactId>spring-boot-webmvc-test</artifactId>
57+
<scope>test</scope>
58+
</dependency>
59+
<dependency>
60+
<groupId>org.springframework.boot</groupId>
61+
<artifactId>spring-boot-webtestclient</artifactId>
62+
</dependency>
4863
</dependencies>
4964

5065
<dependencyManagement>

spring-cloud-function-samples/function-sample-spring-integration/src/test/java/example/FunctionSampleSpringIntegrationApplicationTests.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@
2121
import org.junit.jupiter.api.Test;
2222

2323
import org.springframework.beans.factory.annotation.Autowired;
24+
import org.springframework.boot.resttestclient.TestRestTemplate;
25+
import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureTestRestTemplate;
2426
import org.springframework.boot.test.context.SpringBootTest;
25-
import org.springframework.boot.web.server.test.client.TestRestTemplate;
2627
import org.springframework.http.HttpEntity;
2728
import org.springframework.http.HttpHeaders;
2829
import org.springframework.http.MediaType;
2930

3031
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
32+
@AutoConfigureTestRestTemplate
3133
public class FunctionSampleSpringIntegrationApplicationTests {
3234

3335
@Autowired

spring-cloud-function-samples/function-sample/pom.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,21 @@
5050
<artifactId>spring-boot-starter-test</artifactId>
5151
<scope>test</scope>
5252
</dependency>
53+
<dependency>
54+
<groupId>org.springframework.boot</groupId>
55+
<artifactId>spring-boot-resttestclient</artifactId>
56+
<scope>test</scope>
57+
</dependency>
58+
59+
<dependency>
60+
<groupId>org.springframework.boot</groupId>
61+
<artifactId>spring-boot-webmvc-test</artifactId>
62+
<scope>test</scope>
63+
</dependency>
64+
<dependency>
65+
<groupId>org.springframework.boot</groupId>
66+
<artifactId>spring-boot-webtestclient</artifactId>
67+
</dependency>
5368
</dependencies>
5469

5570
<dependencyManagement>

spring-cloud-function-samples/function-sample/src/test/java/com/example/SampleApplicationMvcTests.java

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)