From 59b15b5179827546474564263b256218d3f6be9a Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Fri, 30 Sep 2022 11:20:22 -0400 Subject: [PATCH] Change TrustStoreTest to use File.separator to support Windows path (#258) Signed-off-by: Peter Zhu Signed-off-by: Peter Zhu (cherry picked from commit 7dcb3a03168836aee9ca5e8bc2bab29749cea41c) --- 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);