Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve: replace jenvtest with kube-api-test from fabric8 client #2497

Merged
merged 8 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions operator-framework/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.javaoperatorsdk</groupId>
<artifactId>jenvtest</artifactId>
<groupId>io.fabric8</groupId>
<artifactId>kube-api-test-client-inject</artifactId>
<scope>test</scope>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it still use the test scope?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that is inherited from dependency management

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://stackoverflow.com/questions/15221299/dependencymanagement-and-scope seems to indicate that putting scopes in dependencyManagement is a bad practice…

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, ok np, will move it

</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
import java.time.Duration;

import org.junit.jupiter.api.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import io.fabric8.kubeapitest.junit.EnableKubeAPIServer;
import io.fabric8.kubernetes.api.model.ConfigMap;
import io.fabric8.kubernetes.api.model.ConfigMapBuilder;
import io.fabric8.kubernetes.api.model.Namespace;
Expand All @@ -18,7 +17,6 @@
import io.fabric8.kubernetes.client.KubernetesClient;
import io.fabric8.kubernetes.client.KubernetesClientBuilder;
import io.fabric8.kubernetes.client.utils.KubernetesResourceUtil;
import io.javaoperatorsdk.jenvtest.junit.EnableKubeAPIServer;
import io.javaoperatorsdk.operator.Operator;
import io.javaoperatorsdk.operator.OperatorException;
import io.javaoperatorsdk.operator.ReconcilerUtils;
Expand Down Expand Up @@ -49,8 +47,6 @@
@EnableKubeAPIServer(apiServerFlags = {"--min-request-timeout", "1"}, updateKubeConfigFile = true)
class InformerRelatedBehaviorITS {

private static final Logger log = LoggerFactory.getLogger(InformerRelatedBehaviorITS.class);

public static final String TEST_RESOURCE_NAME = "test1";
public static final String ADDITIONAL_NAMESPACE_SUFFIX = "-additional";

Expand Down
8 changes: 3 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
<micrometer-core.version>1.13.3</micrometer-core.version>
<okhttp.version>4.12.0</okhttp.version>
<caffeine.version>3.1.8</caffeine.version>
<jenvtest.version>0.9.6</jenvtest.version>
<mustache.version>0.9.11</mustache.version>
<commons.io.version>2.16.1</commons.io.version>

Expand Down Expand Up @@ -215,10 +214,9 @@
<version>${caffeine.version}</version>
</dependency>
<dependency>
<groupId>io.javaoperatorsdk</groupId>
<artifactId>jenvtest</artifactId>
<version>${jenvtest.version}</version>
<scope>test</scope>
<groupId>io.fabric8</groupId>
<artifactId>kube-api-test-client-inject</artifactId>
<version>${fabric8-client.version}</version>
</dependency>
<!-- Kubernetes client HTTP client implementations -->
<!-- Default implementation is controlled by fabric8-httpclient-impl.name property -->
Expand Down
Loading