Skip to content

Commit 35ffe5d

Browse files
committed
merge
2 parents 56ffc9f + 0900b73 commit 35ffe5d

File tree

21 files changed

+168
-649
lines changed

21 files changed

+168
-649
lines changed

spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-fabric8-client-catalog-watcher/src/test/java/org/springframework/cloud/kubernetes/fabric8/catalog/watch/Fabric8CatalogWatchWithEndpointSlicesAndNamespaceFilterIT.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
import org.springframework.context.annotation.Primary;
3636

3737
import static org.springframework.cloud.kubernetes.fabric8.catalog.watch.Fabric8CatalogWatchWithEndpointSlicesAndNamespaceFilterIT.TestConfig;
38+
import static org.springframework.cloud.kubernetes.fabric8.catalog.watch.TestAssertions.assertLogStatement;
39+
import static org.springframework.cloud.kubernetes.fabric8.catalog.watch.TestAssertions.invokeAndAssert;
3840

3941
/**
4042
* @author wind57
@@ -61,6 +63,7 @@ void beforeEach() {
6163

6264
@AfterEach
6365
void afterEach() {
66+
// busybox is deleted as part of the test itself, thus not seen here
6467
util.deleteNamespace(NAMESPACE_A);
6568
util.deleteNamespace(NAMESPACE_B);
6669
}
@@ -77,8 +80,8 @@ void afterEach() {
7780
*/
7881
@Test
7982
void test(CapturedOutput output) {
80-
TestAssertions.assertLogStatement(output, "stateGenerator is of type: Fabric8EndpointSliceV1CatalogWatch");
81-
TestAssertions.invokeAndAssert(util, Set.of(NAMESPACE_A, NAMESPACE_B), port, NAMESPACE_A);
83+
assertLogStatement(output, "stateGenerator is of type: Fabric8EndpointSliceV1CatalogWatch");
84+
invokeAndAssert(util, Set.of(NAMESPACE_A, NAMESPACE_B), port, NAMESPACE_A);
8285
}
8386

8487
@TestConfiguration

spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-fabric8-client-catalog-watcher/src/test/java/org/springframework/cloud/kubernetes/fabric8/catalog/watch/Fabric8CatalogWatchWithEndpointSlicesIT.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.util.Set;
2020

2121
import io.fabric8.kubernetes.client.KubernetesClient;
22+
import org.junit.jupiter.api.AfterEach;
2223
import org.junit.jupiter.api.BeforeEach;
2324
import org.junit.jupiter.api.Test;
2425

@@ -34,6 +35,8 @@
3435
import org.springframework.context.annotation.Primary;
3536

3637
import static org.springframework.cloud.kubernetes.fabric8.catalog.watch.Fabric8CatalogWatchWithEndpointSlicesIT.TestConfig;
38+
import static org.springframework.cloud.kubernetes.fabric8.catalog.watch.TestAssertions.assertLogStatement;
39+
import static org.springframework.cloud.kubernetes.fabric8.catalog.watch.TestAssertions.invokeAndAssert;
3740

3841
/**
3942
* @author wind57
@@ -51,6 +54,12 @@ void beforeEach() {
5154
util.busybox(NAMESPACE, Phase.CREATE);
5255
}
5356

57+
@AfterEach
58+
void afterEach() {
59+
// empty on purpose
60+
// busybox is deleted as part of the test itself, thus not seen here
61+
}
62+
5463
/**
5564
* <pre>
5665
* - we deploy a busybox service with 2 replica pods
@@ -62,8 +71,8 @@ void beforeEach() {
6271
*/
6372
@Test
6473
void test(CapturedOutput output) {
65-
TestAssertions.assertLogStatement(output, "stateGenerator is of type: Fabric8EndpointSliceV1CatalogWatch");
66-
TestAssertions.invokeAndAssert(util, Set.of(NAMESPACE), port, NAMESPACE);
74+
assertLogStatement(output, "stateGenerator is of type: Fabric8EndpointSliceV1CatalogWatch");
75+
invokeAndAssert(util, Set.of(NAMESPACE), port, NAMESPACE);
6776
}
6877

6978
@TestConfiguration

spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-fabric8-client-catalog-watcher/src/test/java/org/springframework/cloud/kubernetes/fabric8/catalog/watch/Fabric8CatalogWatchWithEndpointsAndNamespaceFilterIT.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
import org.springframework.context.annotation.Primary;
3636

3737
import static org.springframework.cloud.kubernetes.fabric8.catalog.watch.Fabric8CatalogWatchWithEndpointsAndNamespaceFilterIT.TestConfig;
38+
import static org.springframework.cloud.kubernetes.fabric8.catalog.watch.TestAssertions.assertLogStatement;
39+
import static org.springframework.cloud.kubernetes.fabric8.catalog.watch.TestAssertions.invokeAndAssert;
3840

3941
/**
4042
* @author wind57
@@ -61,6 +63,7 @@ void beforeEach() {
6163

6264
@AfterEach
6365
void afterEach() {
66+
// busybox is deleted as part of the assertions, thus not seen here
6467
util.deleteNamespace(NAMESPACE_A);
6568
util.deleteNamespace(NAMESPACE_B);
6669
}
@@ -77,8 +80,8 @@ void afterEach() {
7780
*/
7881
@Test
7982
void test(CapturedOutput output) {
80-
TestAssertions.assertLogStatement(output, "stateGenerator is of type: Fabric8EndpointsCatalogWatch");
81-
TestAssertions.invokeAndAssert(util, Set.of(NAMESPACE_A, NAMESPACE_B), port, NAMESPACE_A);
83+
assertLogStatement(output, "stateGenerator is of type: Fabric8EndpointsCatalogWatch");
84+
invokeAndAssert(util, Set.of(NAMESPACE_A, NAMESPACE_B), port, NAMESPACE_A);
8285
}
8386

8487
@TestConfiguration

spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-fabric8-client-catalog-watcher/src/test/java/org/springframework/cloud/kubernetes/fabric8/catalog/watch/Fabric8CatalogWatchWithEndpointsIT.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.util.Set;
2020

2121
import io.fabric8.kubernetes.client.KubernetesClient;
22+
import org.junit.jupiter.api.AfterEach;
2223
import org.junit.jupiter.api.BeforeEach;
2324
import org.junit.jupiter.api.Test;
2425

@@ -34,6 +35,8 @@
3435
import org.springframework.context.annotation.Primary;
3536

3637
import static org.springframework.cloud.kubernetes.fabric8.catalog.watch.Fabric8CatalogWatchWithEndpointsIT.TestConfig;
38+
import static org.springframework.cloud.kubernetes.fabric8.catalog.watch.TestAssertions.assertLogStatement;
39+
import static org.springframework.cloud.kubernetes.fabric8.catalog.watch.TestAssertions.invokeAndAssert;
3740

3841
/**
3942
* @author wind57
@@ -51,6 +54,12 @@ void beforeEach() {
5154
util.busybox(NAMESPACE, Phase.CREATE);
5255
}
5356

57+
@AfterEach
58+
void afterEach() {
59+
// empty on purpose
60+
// busybox is deleted as part of the test itself, thus not seen here
61+
}
62+
5463
/**
5564
* <pre>
5665
* - we deploy a busybox service with 2 replica pods
@@ -62,8 +71,8 @@ void beforeEach() {
6271
*/
6372
@Test
6473
void test(CapturedOutput output) {
65-
TestAssertions.assertLogStatement(output, "stateGenerator is of type: Fabric8EndpointsCatalogWatch");
66-
TestAssertions.invokeAndAssert(util, Set.of(NAMESPACE), port, NAMESPACE);
74+
assertLogStatement(output, "stateGenerator is of type: Fabric8EndpointsCatalogWatch");
75+
invokeAndAssert(util, Set.of(NAMESPACE), port, NAMESPACE);
6776
}
6877

6978
@TestConfiguration

spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-fabric8-client-istio/src/test/java/org/springframework/cloud/kubernetes/fabric8/client/istio/Fabric8IstioIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ static void beforeAll() throws Exception {
9292
static void afterAll() throws Exception {
9393
util.deleteNamespace("istio-system");
9494
Commons.cleanUp(IMAGE_NAME, K3S);
95-
Commons.systemPrune();
9695
}
9796

9897
@AfterAll

spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-fabric8-client-reload/src/test/java/org/springframework/cloud/kubernetes/fabric8/client/reload/Fabric8EventReloadIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ static void afterAll() throws Exception {
8484
util.deleteNamespace("left");
8585
util.deleteNamespace("right");
8686
Commons.cleanUp(IMAGE_NAME, K3S);
87-
Commons.systemPrune();
8887

8988
manifests(Phase.DELETE);
9089
}

spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-k8s-client-catalog-watcher/src/test/java/org/springframework/cloud/kubernetes/k8s/client/catalog/watcher/KubernetesClientCatalogWatchIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ static void afterAll() {
9090
util.deleteNamespace(NAMESPACE_A);
9191
util.deleteNamespace(NAMESPACE_B);
9292
app(Phase.DELETE);
93-
Commons.systemPrune();
9493
}
9594

9695
@BeforeEach

spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-k8s-client-configuration-watcher/src/test/java/org/springframework/cloud/kubernetes/configuration/watcher/ActuatorRefreshIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ static void beforeAll() throws Exception {
8080
static void afterAll() throws Exception {
8181
configWatcher(Phase.DELETE);
8282
Commons.cleanUp(SPRING_CLOUD_K8S_CONFIG_WATCHER_APP_NAME, K3S);
83-
Commons.systemPrune();
8483
}
8584

8685
@BeforeEach

spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-k8s-client-configuration-watcher/src/test/java/org/springframework/cloud/kubernetes/configuration/watcher/ActuatorRefreshMultipleNamespacesIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ static void afterAll() throws Exception {
8484
util.deleteNamespace(LEFT_NAMESPACE);
8585
util.deleteNamespace(RIGHT_NAMESPACE);
8686
Commons.cleanUp(SPRING_CLOUD_K8S_CONFIG_WATCHER_APP_NAME, K3S);
87-
Commons.systemPrune();
8887
}
8988

9089
/**

spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-k8s-client-discovery-server/src/test/java/org/springframework/cloud/kubernetes/discoveryclient/it/DiscoveryClientIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ static void afterAll() throws Exception {
189189

190190
discoveryServer(Phase.DELETE);
191191
discoveryClient(Phase.DELETE);
192-
Commons.systemPrune();
193192
}
194193

195194
@Test

0 commit comments

Comments
 (0)