This is an automated email from the ASF dual-hosted git repository.
gtully pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/main by this push:
new 7d537882ca ARTEMIS-3168 - fix test, ref to auto created pem before
creation complete
7d537882ca is described below
commit 7d537882ca4f2a00cc1cd081b256872c77e4604f
Author: Gary Tully <[email protected]>
AuthorDate: Fri Nov 25 17:29:05 2022 +0000
ARTEMIS-3168 - fix test, ref to auto created pem before creation complete
---
.../jaas/kubernetes/client/KubernetesClientImplTest.java | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git
a/artemis-server/src/test/java/org/apache/activemq/artemis/spi/core/security/jaas/kubernetes/client/KubernetesClientImplTest.java
b/artemis-server/src/test/java/org/apache/activemq/artemis/spi/core/security/jaas/kubernetes/client/KubernetesClientImplTest.java
index f746fa6a20..fe460cecad 100644
---
a/artemis-server/src/test/java/org/apache/activemq/artemis/spi/core/security/jaas/kubernetes/client/KubernetesClientImplTest.java
+++
b/artemis-server/src/test/java/org/apache/activemq/artemis/spi/core/security/jaas/kubernetes/client/KubernetesClientImplTest.java
@@ -71,11 +71,6 @@ public class KubernetesClientImplTest {
System.setProperty("KUBERNETES_SERVICE_PORT", port);
System.setProperty("KUBERNETES_TOKEN_PATH",
KubernetesClientImplTest.class.getClassLoader().getResource("client_token").getPath());
- URL caPath = KubernetesClientImplTest.class.getClassLoader()
- .getResource("CertificateAuthorityCertificate.pem");
- if (caPath != null) {
- System.setProperty("KUBERNETES_CA_PATH", caPath.getPath());
- }
mockServer.when(
request()
@@ -105,6 +100,13 @@ public class KubernetesClientImplTest {
response()
.withStatusCode(HTTP_INTERNAL_ERROR));
+
+ // proactivelyInitialiseTLS to
dynamicallyCreateCertificateAuthorityCertificate
+ // only kicks in when the client is created to support the mock responses
+ URL caPath = KubernetesClientImplTest.class.getClassLoader()
+ .getResource("CertificateAuthorityCertificate.pem");
+ assertNotNull(caPath);
+ System.setProperty("KUBERNETES_CA_PATH", caPath.getPath());
}
@AfterClass