Skip to content

Commit 3734052

Browse files
Alexey Markevichandymc12
authored andcommitted
microprofile-rest-client-tck: tests failed on Windows (#198)
Signed-off-by: Alexey Markevich <[email protected]>
1 parent c014aa8 commit 3734052

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

tck/src/main/java/org/eclipse/microprofile/rest/client/tck/ssl/AbstractSslTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ private static void copyResourceTo(String resource, Path directory) {
163163
}
164164
}
165165

166+
static String filePath(File file) {
167+
return file.toURI().toString();
168+
}
169+
166170
@BeforeClass
167171
public static void initHttpsServer() {
168172
initializeCertificateLocations();

tck/src/main/java/org/eclipse/microprofile/rest/client/tck/ssl/SslMutualTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,25 +66,25 @@ public static WebArchive createDeployment() {
6666
// @formatter:off
6767
String config =
6868
configLine(JsonPClient.class, "uri", BASE_URI_STRING) +
69-
configLine(ClientWithTruststore.class, "trustStore", clientTruststore.getAbsolutePath()) +
69+
configLine(ClientWithTruststore.class, "trustStore", filePath(clientTruststore)) +
7070
configLine(ClientWithTruststore.class, "trustStorePassword", PASSWORD) +
7171
configLine(ClientWithTruststore.class, "uri", BASE_URI_STRING) +
7272

73-
configLine(ClientWithKeystoreAndTruststore.class, "trustStore", clientTruststore.getAbsolutePath()) +
73+
configLine(ClientWithKeystoreAndTruststore.class, "trustStore", filePath(clientTruststore)) +
7474
configLine(ClientWithKeystoreAndTruststore.class, "trustStorePassword", PASSWORD) +
75-
configLine(ClientWithKeystoreAndTruststore.class, "keyStore", clientKeystore.getAbsolutePath()) +
75+
configLine(ClientWithKeystoreAndTruststore.class, "keyStore", filePath(clientKeystore)) +
7676
configLine(ClientWithKeystoreAndTruststore.class, "keyStorePassword", PASSWORD) +
7777
configLine(ClientWithKeystoreAndTruststore.class, "uri", BASE_URI_STRING) +
7878

79-
configLine(ClientWithKeystoreFromClasspathAndTruststore.class, "trustStore", clientTruststore.getAbsolutePath()) +
79+
configLine(ClientWithKeystoreFromClasspathAndTruststore.class, "trustStore", filePath(clientTruststore)) +
8080
configLine(ClientWithKeystoreFromClasspathAndTruststore.class, "trustStorePassword", PASSWORD) +
8181
configLine(ClientWithKeystoreFromClasspathAndTruststore.class, "keyStore", "classpath:/META-INF/" + clientKeystoreFromClasspath) +
8282
configLine(ClientWithKeystoreFromClasspathAndTruststore.class, "keyStorePassword", PASSWORD) +
8383
configLine(ClientWithKeystoreFromClasspathAndTruststore.class, "uri", BASE_URI_STRING) +
8484

85-
configLine(ClientWithNonMatchingStore.class, "trustStore", clientTruststore.getAbsolutePath()) +
85+
configLine(ClientWithNonMatchingStore.class, "trustStore", filePath(clientTruststore)) +
8686
configLine(ClientWithNonMatchingStore.class, "trustStorePassword", PASSWORD) +
87-
configLine(ClientWithNonMatchingStore.class, "keyStore", serverKeystore.getAbsolutePath()) +
87+
configLine(ClientWithNonMatchingStore.class, "keyStore", filePath(serverKeystore)) +
8888
configLine(ClientWithNonMatchingStore.class, "keyStorePassword", PASSWORD) +
8989
configLine(ClientWithNonMatchingStore.class, "uri", BASE_URI_STRING);
9090
// @formatter:on

tck/src/main/java/org/eclipse/microprofile/rest/client/tck/ssl/SslTrustStoreTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
import javax.inject.Inject;
3232
import javax.ws.rs.ProcessingException;
33-
import java.io.File;
3433
import java.security.KeyStore;
3534

3635
import static org.eclipse.microprofile.rest.client.tck.utils.ConfigUtil.configLine;
@@ -82,10 +81,6 @@ public static WebArchive createDeployment() {
8281
return webArchive;
8382
}
8483

85-
private static String filePath(File file) {
86-
return String.format("file:%s", file.getAbsolutePath());
87-
}
88-
8984
@Test(expectedExceptions = ProcessingException.class)
9085
public void shouldFailWithSelfSignedKeystore() {
9186
RestClientBuilder.newBuilder()

0 commit comments

Comments
 (0)