Skip to content

Commit

Permalink
Fix Infinispan resource loading on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvavrik committed Oct 1, 2023
1 parent 6d06da2 commit e107fac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public class LegacyUsingJksInfinispanBookCacheIT extends BaseBookCacheIT {

@Container(image = "docker.io/infinispan/server:13.0", expectedLog = "Infinispan Server.*started in", port = 11222)
static final InfinispanService infinispan = new InfinispanService()
.withConfigFile("jks-config.yaml")
.withSecretFiles("jks/server.jks");
.withConfigFile("/jks-config.yaml")
.withSecretFiles("/jks/server.jks");

@QuarkusApplication
static final RestService app = new RestService()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class UsingJksInfinispanBookCacheIT extends BaseBookCacheIT {
@Container(image = "docker.io/infinispan/server:14.0", expectedLog = "Infinispan Server.*started in", port = 11222)
static final InfinispanService infinispan = new InfinispanService()
.withConfigFile("infinispan.xml")
.withSecretFiles("jks/keystore.jks");
.withSecretFiles("/jks/keystore.jks");

@QuarkusApplication
static final RestService app = new RestService()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import static io.quarkus.test.utils.PropertiesUtils.RESOURCE_PREFIX;
import static io.quarkus.test.utils.PropertiesUtils.SECRET_PREFIX;
import static io.quarkus.test.utils.PropertiesUtils.SLASH;

import java.util.Arrays;
import java.util.List;
Expand Down Expand Up @@ -63,20 +62,20 @@ public InfinispanService onPreStart(Action action) {

if (configFile != null && !configFile.isEmpty()) {
// legacy -> Infinispan previous to version 14
withProperty("CONFIG_PATH", RESOURCE_PREFIX + SLASH + configFile);
withProperty("CONFIG_PATH", RESOURCE_PREFIX + configFile);
// Infinispan 14+ configuration setup
withProperty("INFINISPAN_CONFIG_PATH", "resource_with_destination::/opt/infinispan/server/conf|" + configFile);
}

if (userConfigFiles != null) {
for (int index = 0; index < userConfigFiles.size(); index++) {
withProperty("USER_CONFIG_" + index, RESOURCE_PREFIX + SLASH + userConfigFiles.get(index));
withProperty("USER_CONFIG_" + index, RESOURCE_PREFIX + userConfigFiles.get(index));
}
}

if (secretFiles != null) {
for (int index = 0; index < secretFiles.size(); index++) {
withProperty("SECRET_" + index, SECRET_PREFIX + SLASH + secretFiles.get(index));
withProperty("SECRET_" + index, SECRET_PREFIX + secretFiles.get(index));
}
}

Expand Down

0 comments on commit e107fac

Please sign in to comment.