Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ HttpEntity createBuildRequestPayload(List<ExtenderResource> sourceResources) thr
try (ZipOutputStream zipStream = new ZipOutputStream(byteStream)) {
sourceResources.stream()
.filter(res -> {
return !cachedFiles.contains(res.getPath());
return !cachedFiles.contains(res.getPath())
&& !res.getPath().endsWith(".DS_Store");
})
.forEach(res -> {
Path path = Path.of(res.getPath());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ private static Stream<Arguments> uploadData() {
Arguments.of(null, List.of("build/a", "build/b", "build/c"))
);
}

@ParameterizedTest()
@ParameterizedTest
@MethodSource("uploadData")
public void testUploadStructure(String cacheResponse, List<String> expectedFilenames) throws Exception {
try {
Expand All @@ -149,23 +148,27 @@ public void testUploadStructure(String cacheResponse, List<String> expectedFilen
File a = new File("build/a");
File b = new File("build/b");
File c = new File("build/c");
File e = new File("build/.DS_Store");
FileExtenderResource aRes = new FileExtenderResource(a);
FileExtenderResource bRes = new FileExtenderResource(b);
FileExtenderResource cRes = new FileExtenderResource(c);
FileExtenderResource eRes = new FileExtenderResource(e);

a.deleteOnExit();
b.deleteOnExit();
c.deleteOnExit();
e.deleteOnExit();

TestUtils.writeToFile("build/a", "a");
TestUtils.writeToFile("build/b", "b");
TestUtils.writeToFile("build/c", "c");
TestUtils.writeToFile("build/e", "e");

List<ExtenderResource> inputFiles = new ArrayList<>();
inputFiles.add(aRes);
inputFiles.add(bRes);
inputFiles.add(cRes);

inputFiles.add(eRes);

HttpEntity entity = extenderClient.createBuildRequestPayload(inputFiles);
assertNotNull(entity);
Expand Down