Skip to content

Commit

Permalink
[JBEAP-25770] Use linux file separator in the cache folder path
Browse files Browse the repository at this point in the history
  • Loading branch information
spyrkob committed Jan 10, 2024
1 parent 698f12f commit e909ec3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,12 @@ public void installWildflyCore() throws Exception {
.containsExactly(MetadataTestUtils.class.getClassLoader().getResource(CHANNEL_BASE_CORE_19).toExternalForm());

// verify the provisioning.xml was recorded in the .installation folder
assertThat(outputPath.resolve(ProsperoMetadataUtils.METADATA_DIR).resolve(ProsperoMetadataUtils.PROVISIONING_RECORD_XML))
final Path provisioningRecordFile = outputPath.resolve(ProsperoMetadataUtils.METADATA_DIR).resolve(ProsperoMetadataUtils.PROVISIONING_RECORD_XML);
assertThat(provisioningRecordFile)
.hasSameTextualContentAs(PathsUtils.getProvisioningXml(outputPath));
// verify the cache dir always uses linux file separator
assertThat(Files.readString(provisioningRecordFile))
.contains(String.format("<option name=\"jboss-resolved-artifacts-cache\" value=\"%s/%s\"/>", ProsperoMetadataUtils.METADATA_DIR, ".cache"));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.wildfly.channel.UnresolvedMavenArtifactException;
import org.wildfly.prospero.ProsperoLogger;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
Expand Down Expand Up @@ -65,7 +66,7 @@ public class GalleonUtils {
public static final String STORE_INPUT_PROVISIONING_CONFIG_PROPERTY = "store-input-provisioning-config";
public static final String STORE_INPUT_PROVISIONING_CONFIG_VALUE = "true";
public static final String STORE_PROVISIONED_ARTIFACTS = "jboss-resolved-artifacts-cache";
public static final String STORE_PROVISIONED_ARTIFACTS_VALUE = ArtifactCache.CACHE_FOLDER.toString();
public static final String STORE_PROVISIONED_ARTIFACTS_VALUE = ArtifactCache.CACHE_FOLDER.toString().replace(File.separatorChar, '/');

private static final String CLASSPATH_SCHEME = "classpath";
private static final String FILE_SCHEME = "file";
Expand Down

0 comments on commit e909ec3

Please sign in to comment.