Remove one integration test (12) (#1433)

This commit is contained in:
erabii
2023-09-18 21:30:51 +03:00
committed by GitHub
parent f87fe54ee9
commit 0df84dc1ad
10 changed files with 2 additions and 245 deletions

View File

@@ -57,7 +57,6 @@
<module>spring-cloud-kubernetes-discoveryclient-it</module>
<module>spring-cloud-kubernetes-client-loadbalancer-it</module>
<module>spring-cloud-kubernetes-client-reactive-discoveryclient-it</module>
<module>spring-cloud-kubernetes-configuration-watcher-it</module>
<module>spring-cloud-kubernetes-core-k8s-client-it</module>
<module>spring-cloud-kubernetes-client-event-and-polling-reload</module>

View File

@@ -330,7 +330,7 @@ class KubernetesClientDiscoveryClientIT {
KubernetesClientDiscoveryClientUtils.patchForReactiveHealth(DEPLOYMENT_NAME, NAMESPACE);
new KubernetesClientDiscoveryHealthITDelegate().testReactiveConfiguration(util, K3S);
new KubernetesClientDiscoveryHealthITDelegate().testReactiveConfiguration(K3S);
}
@Test

View File

@@ -99,7 +99,7 @@ class KubernetesClientDiscoveryHealthITDelegate {
* We assert for logs and call '/health' endpoint to see that blocking discovery
* client was initialized.
*/
void testReactiveConfiguration(Util util, K3sContainer container) {
void testReactiveConfiguration(K3sContainer container) {
KubernetesClientDiscoveryClientUtils.patchForReactiveHealth(DEPLOYMENT_NAME, NAMESPACE);

View File

@@ -1,106 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-kubernetes-integration-tests</artifactId>
<version>3.0.5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-cloud-kubernetes-client-reactive-discoveryclient-it</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-kubernetes-client-all</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-kubernetes-test-support</artifactId>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>../src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<!-- build image in the 'package' phase, and ignore plain tests -->
<!-- via maven-surefire-plugin::skipTests -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<imageName>docker.io/springcloud/${project.artifactId}:${project.version}</imageName>
</configuration>
<executions>
<execution>
<id>build-image</id>
<configuration>
<skip>${skip.build.image}</skip>
</configuration>
<phase>package</phase>
<goals>
<goal>build-image</goal>
</goals>
</execution>
<execution>
<id>repackage</id>
<phase>package</phase>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- ignore plain tests (in the 'test' phase), so that we could build the image first, see above -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
<!-- run tests in the 'integration-tests' phase, one that is after 'package' (where we build the image) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<include>${testsToRun}</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@@ -1,52 +0,0 @@
/*
* Copyright 2013-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cloud.kubernetes.client.reactive.discovery.it;
import java.util.stream.Collectors;
import reactor.core.publisher.Mono;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.kubernetes.client.discovery.reactive.KubernetesInformerReactiveDiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author Ryan Baxter
*/
@SpringBootApplication
@RestController
public class KubernetesClientReactiveDiscoveryClientApplicationIt {
private final KubernetesInformerReactiveDiscoveryClient discoveryClient;
public KubernetesClientReactiveDiscoveryClientApplicationIt(
KubernetesInformerReactiveDiscoveryClient discoveryClient) {
this.discoveryClient = discoveryClient;
}
public static void main(String[] args) {
SpringApplication.run(KubernetesClientReactiveDiscoveryClientApplicationIt.class, args);
}
@GetMapping("/services")
public Mono<String> services() {
return discoveryClient.getServices().collect(Collectors.joining(","));
}
}

View File

@@ -1,12 +0,0 @@
spring:
webflux:
base-path: /reactive-discovery-it
management:
endpoint:
health:
show-details: always
endpoints:
web:
exposure:
include: "*"

View File

@@ -1,14 +0,0 @@
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
</encoder>
</appender>
<root level="info">
<appender-ref ref="STDOUT"/>
</root>
<logger name="org.testcontainers" level="INFO"/>
<logger name="com.github.dockerjava" level="WARN"/>
</configuration>

View File

@@ -1,28 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: spring-cloud-kubernetes-client-reactive-discoveryclient-it-deployment
spec:
selector:
matchLabels:
app: spring-cloud-kubernetes-client-reactive-discoveryclient-it
template:
metadata:
labels:
app: spring-cloud-kubernetes-client-reactive-discoveryclient-it
spec:
serviceAccountName: spring-cloud-kubernetes-serviceaccount
containers:
- name: spring-cloud-kubernetes-client-reactive-discoveryclient-it
image: docker.io/springcloud/spring-cloud-kubernetes-client-reactive-discoveryclient-it
imagePullPolicy: IfNotPresent
readinessProbe:
httpGet:
port: 8080
path: /reactive-discovery-it/actuator/health/readiness
livenessProbe:
httpGet:
port: 8080
path: /reactive-discovery-it/actuator/health/liveness
ports:
- containerPort: 8080

View File

@@ -1,16 +0,0 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: it-ingress
namespace: default
spec:
rules:
- http:
paths:
- path: /reactive-discovery-it
pathType: ImplementationSpecific
backend:
service:
name: spring-cloud-kubernetes-client-reactive-discoveryclient-it
port:
number: 8080

View File

@@ -1,14 +0,0 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: spring-cloud-kubernetes-client-reactive-discoveryclient-it
name: spring-cloud-kubernetes-client-reactive-discoveryclient-it
spec:
ports:
- name: http
port: 8080
targetPort: 8080
selector:
app: spring-cloud-kubernetes-client-reactive-discoveryclient-it
type: ClusterIP