Skip to content

Commit 7c1f7db

Browse files
committed
more fixes
Signed-off-by: wind57 <[email protected]>
1 parent 8d46e2c commit 7c1f7db

File tree

79 files changed

+222
-40
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+222
-40
lines changed

spring-cloud-kubernetes-client-autoconfig/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@
6565
<artifactId>spring-cloud-kubernetes-test-support</artifactId>
6666
<scope>test</scope>
6767
</dependency>
68+
<dependency>
69+
<groupId>org.springframework.boot</groupId>
70+
<artifactId>spring-boot-webtestclient</artifactId>
71+
<scope>test</scope>
72+
</dependency>
6873
</dependencies>
6974

7075
</project>

spring-cloud-kubernetes-client-autoconfig/src/test/java/org/springframework/cloud/kubernetes/client/ActuatorDisabledHealthTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
import org.springframework.beans.factory.annotation.Autowired;
2323
import org.springframework.boot.health.registry.ReactiveHealthContributorRegistry;
2424
import org.springframework.boot.test.context.SpringBootTest;
25-
import org.springframework.boot.web.server.test.LocalManagementPort;
25+
import org.springframework.boot.test.web.server.LocalManagementPort;
26+
import org.springframework.boot.webtestclient.AutoConfigureWebTestClient;
2627
import org.springframework.http.MediaType;
2728
import org.springframework.test.web.reactive.server.WebTestClient;
2829

@@ -33,6 +34,7 @@
3334
properties = { "management.health.kubernetes.enabled=false", "management.endpoint.health.show-details=always",
3435
"management.endpoint.health.show-components=always", "spring.main.cloud-platform=KUBERNETES",
3536
"management.endpoints.web.exposure.include=health" })
37+
@AutoConfigureWebTestClient
3638
class ActuatorDisabledHealthTest {
3739

3840
@Autowired

spring-cloud-kubernetes-client-autoconfig/src/test/java/org/springframework/cloud/kubernetes/client/ActuatorEnabledHealthTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@
2222
import org.springframework.beans.factory.annotation.Autowired;
2323
import org.springframework.boot.health.registry.HealthContributorRegistry;
2424
import org.springframework.boot.test.context.SpringBootTest;
25-
import org.springframework.boot.web.server.test.LocalManagementPort;
25+
import org.springframework.boot.test.web.server.LocalManagementPort;
26+
import org.springframework.boot.webtestclient.AutoConfigureWebTestClient;
2627
import org.springframework.http.MediaType;
2728
import org.springframework.test.web.reactive.server.WebTestClient;
2829

2930
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = TestApp.class,
3031
properties = { "management.health.kubernetes.enabled=true", "management.endpoint.health.show-details=always",
3132
"management.endpoint.health.show-components=always", "management.endpoints.web.exposure.include=health",
3233
"spring.main.cloud-platform=KUBERNETES" })
34+
@AutoConfigureWebTestClient
3335
class ActuatorEnabledHealthTest {
3436

3537
@Autowired

spring-cloud-kubernetes-client-config/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@
114114
<artifactId>spring-cloud-kubernetes-test-support</artifactId>
115115
<scope>test</scope>
116116
</dependency>
117+
<dependency>
118+
<groupId>org.springframework.boot</groupId>
119+
<artifactId>spring-boot-webtestclient</artifactId>
120+
<scope>test</scope>
121+
</dependency>
117122
</dependencies>
118123

119124

spring-cloud-kubernetes-client-config/src/test/java/org/springframework/cloud/kubernetes/client/config/applications/labeled_config_map_with_prefix/LabeledConfigMapWithPrefixTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.junit.jupiter.api.Test;
2424

2525
import org.springframework.beans.factory.annotation.Autowired;
26+
import org.springframework.boot.webtestclient.AutoConfigureWebTestClient;
2627
import org.springframework.test.web.reactive.server.WebTestClient;
2728

2829
/**
@@ -31,6 +32,7 @@
3132
*
3233
* @author wind57
3334
*/
35+
@AutoConfigureWebTestClient
3436
abstract class LabeledConfigMapWithPrefixTests {
3537

3638
@Autowired

spring-cloud-kubernetes-client-config/src/test/java/org/springframework/cloud/kubernetes/client/config/applications/labeled_config_map_with_profile/LabeledConfigMapWithProfileTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import org.junit.jupiter.api.Test;
2323

2424
import org.springframework.beans.factory.annotation.Autowired;
25+
import org.springframework.boot.webtestclient.AutoConfigureWebTestClient;
2526
import org.springframework.cloud.kubernetes.client.config.applications.labeled_config_map_with_profile.properties.Blue;
2627
import org.springframework.cloud.kubernetes.client.config.applications.labeled_config_map_with_profile.properties.Green;
2728
import org.springframework.cloud.kubernetes.client.config.applications.labeled_config_map_with_profile.properties.GreenK8s;
@@ -38,6 +39,7 @@
3839
*
3940
* @author wind57
4041
*/
42+
@AutoConfigureWebTestClient
4143
abstract class LabeledConfigMapWithProfileTests {
4244

4345
@Autowired

spring-cloud-kubernetes-client-config/src/test/java/org/springframework/cloud/kubernetes/client/config/applications/labeled_secret_with_prefix/LabeledSecretWithPrefixTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.junit.jupiter.api.Test;
2424

2525
import org.springframework.beans.factory.annotation.Autowired;
26+
import org.springframework.boot.webtestclient.AutoConfigureWebTestClient;
2627
import org.springframework.cloud.kubernetes.client.config.bootstrap.stubs.LabeledSecretWithPrefixConfigurationStub;
2728
import org.springframework.test.context.TestPropertySource;
2829
import org.springframework.test.web.reactive.server.WebTestClient;
@@ -33,6 +34,7 @@
3334
* @author wind57
3435
*/
3536
@TestPropertySource(properties = "spring.cloud.kubernetes.secrets.enabled=true")
37+
@AutoConfigureWebTestClient
3638
abstract class LabeledSecretWithPrefixTests {
3739

3840
@Autowired

spring-cloud-kubernetes-client-config/src/test/java/org/springframework/cloud/kubernetes/client/config/applications/named_config_map_with_prefix/NamedConfigMapWithPrefixTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.junit.jupiter.api.Test;
2424

2525
import org.springframework.beans.factory.annotation.Autowired;
26+
import org.springframework.boot.webtestclient.AutoConfigureWebTestClient;
2627
import org.springframework.test.web.reactive.server.WebTestClient;
2728

2829
/**
@@ -31,6 +32,7 @@
3132
*
3233
* @author wind57
3334
*/
35+
@AutoConfigureWebTestClient
3436
abstract class NamedConfigMapWithPrefixTests {
3537

3638
@Autowired

spring-cloud-kubernetes-client-config/src/test/java/org/springframework/cloud/kubernetes/client/config/applications/named_config_map_with_profile/NamedConfigMapWithProfileTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.junit.jupiter.api.Test;
2424

2525
import org.springframework.beans.factory.annotation.Autowired;
26+
import org.springframework.boot.webtestclient.AutoConfigureWebTestClient;
2627
import org.springframework.test.web.reactive.server.WebTestClient;
2728

2829
/**
@@ -31,6 +32,7 @@
3132
*
3233
* @author wind57
3334
*/
35+
@AutoConfigureWebTestClient
3436
abstract class NamedConfigMapWithProfileTests {
3537

3638
@Autowired

spring-cloud-kubernetes-client-config/src/test/java/org/springframework/cloud/kubernetes/client/config/applications/named_secret_with_prefix/NamedSecretWithPrefixTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.junit.jupiter.api.Test;
2424

2525
import org.springframework.beans.factory.annotation.Autowired;
26+
import org.springframework.boot.webtestclient.AutoConfigureWebTestClient;
2627
import org.springframework.test.context.TestPropertySource;
2728
import org.springframework.test.web.reactive.server.WebTestClient;
2829

@@ -33,6 +34,7 @@
3334
* @author wind57
3435
*/
3536
@TestPropertySource(properties = "spring.cloud.kubernetes.secrets.enabled=true")
37+
@AutoConfigureWebTestClient
3638
abstract class NamedSecretWithPrefixTests {
3739

3840
@Autowired

0 commit comments

Comments
 (0)