You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@artemis.apache.org by jb...@apache.org on 2026/09/03 16:31:21 UTC

(artemis) 10/14: ARTEMIS-6116 Fix token path for Windows

This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/artemis.git

commit d6a4c8b5dcef0fc024446c31cd6ca26261b15f2c
Author: gchuf <ga...@gmail.com>
AuthorDate: Fri Jul 10 11:13:14 2026 +0200

    ARTEMIS-6116 Fix token path for Windows
---
 .../jaas/kubernetes/client/KubernetesClientImplTest.java       | 10 +++++++---
 1 file changed, 7 insertions(+), 3 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 d060001025..638f2cc167 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
@@ -33,6 +33,7 @@ import static org.mockserver.model.JsonBody.json;
 import java.io.File;
 import java.lang.invoke.MethodHandles;
 import java.net.URL;
+import java.nio.file.Paths;
 import java.util.Map;
 import java.util.Set;
 
@@ -72,7 +73,7 @@ public class KubernetesClientImplTest {
          "kind": "TokenReview", "spec": {"token": "kermit_token"}}""";
 
    @BeforeAll
-   public static void startServer() {
+   public static void startServer() throws Exception {
       ConfigurationProperties.directoryToSaveDynamicSSLCertificate(tempDir.getAbsolutePath());
       ConfigurationProperties.certificateAuthorityPrivateKey(KubernetesClientImplTest.class.getClassLoader().getResource("server-ca.pem").getPath());
       ConfigurationProperties.certificateAuthorityCertificate(KubernetesClientImplTest.class.getClassLoader().getResource("server-ca-cert.pem").getPath());
@@ -86,10 +87,13 @@ public class KubernetesClientImplTest {
 
       assertNotNull(mockServer);
       assertTrue(mockServer.hasStarted());
+
+      URL token = KubernetesClientImplTest.class.getClassLoader().getResource("client_token");
+      String tokenPath = Paths.get(token.toURI()).toString();
+
       System.setProperty("KUBERNETES_SERVICE_HOST", host);
       System.setProperty("KUBERNETES_SERVICE_PORT", port);
-      System.setProperty("KUBERNETES_TOKEN_PATH",
-            KubernetesClientImplTest.class.getClassLoader().getResource("client_token").getPath());
+      System.setProperty("KUBERNETES_TOKEN_PATH", tokenPath);
 
       URL caPath = KubernetesClientImplTest.class.getClassLoader()
          .getResource("client-and-server-ca-certs.pem");


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@artemis.apache.org
For additional commands, e-mail: commits-help@artemis.apache.org