Skip to content

Commit

Permalink
fix path separator
Browse files Browse the repository at this point in the history
Signed-off-by: tvallin <thibault.vallin@oracle.com>
  • Loading branch information
tvallin committed Jul 10, 2023
1 parent fe51cec commit 5fef265
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ void testCanReadPath() {
void testUserHomePrivateKeyPath() {
OciConfig ociConfig = Objects.requireNonNull(OciExtension.ociConfig());
String userHomePrivateKeyPath = OciAuthenticationDetailsProvider.userHomePrivateKeyPath(ociConfig);
MatcherAssert.assertThat(userHomePrivateKeyPath.replace("/", "\\"),
MatcherAssert.assertThat(userHomePrivateKeyPath.replace("\\", "/"),
endsWith("/.oci/oci_api_key.pem"));

ociConfig = OciConfig.builder(ociConfig)
.configPath("/decoy/path")
.authKeyFile("key.pem")
.build();
userHomePrivateKeyPath = OciAuthenticationDetailsProvider.userHomePrivateKeyPath(ociConfig);
MatcherAssert.assertThat(userHomePrivateKeyPath.replace("/", "\\"),
MatcherAssert.assertThat(userHomePrivateKeyPath.replace("\\", "/"),
endsWith("/.oci/key.pem"));
}

Expand Down

0 comments on commit 5fef265

Please sign in to comment.