From 0bd06b996362bba55506c467c2f1ea9b442d0fc7 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Fri, 30 Sep 2022 14:26:44 -0400 Subject: [PATCH] Change TrustStoreTest to use File.separator to support Windows path (#258) (#259) Signed-off-by: Peter Zhu Signed-off-by: Peter Zhu (cherry picked from commit 7dcb3a03168836aee9ca5e8bc2bab29749cea41c) Co-authored-by: Peter Zhu --- src/test/java/org/opensearch/commons/rest/TrustStoreTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/org/opensearch/commons/rest/TrustStoreTest.java b/src/test/java/org/opensearch/commons/rest/TrustStoreTest.java index 108a9e8d..271b1892 100644 --- a/src/test/java/org/opensearch/commons/rest/TrustStoreTest.java +++ b/src/test/java/org/opensearch/commons/rest/TrustStoreTest.java @@ -20,7 +20,7 @@ public class TrustStoreTest { public void testCreate() throws Exception { String resourceName = "sample.pem"; String absolutePath = new File(getClass().getClassLoader().getResource(resourceName).getFile()).getAbsolutePath(); - assertTrue(absolutePath.endsWith("/sample.pem")); + assertTrue(absolutePath.endsWith(File.separator + "sample.pem")); KeyStore store = new TrustStore(absolutePath).create(); assertNotNull(store);