From d33da3b84590d7b5f29ff66a64583544f88a6af7 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Thu, 29 Sep 2022 20:04:28 -0400 Subject: [PATCH] Change TrustStoreTest to use File.separator to support Windows path Signed-off-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);