-
Notifications
You must be signed in to change notification settings - Fork 951
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core-ee): avoid the need of recursiveness when generating outputF…
…iles
- Loading branch information
1 parent
381869b
commit 7584998
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
core/src/test/java/io/kestra/core/tasks/PluginUtilsServiceTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package io.kestra.core.tasks; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import java.io.IOException; | ||
import java.nio.file.Files; | ||
import java.nio.file.Path; | ||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import static org.hamcrest.MatcherAssert.assertThat; | ||
import static org.hamcrest.Matchers.startsWith; | ||
|
||
public class PluginUtilsServiceTest { | ||
@Test | ||
void outputFiles() throws IOException { | ||
Path tempDirectory = Files.createTempDirectory("plugin-utils"); | ||
Map<String, String> outputFilesMap = PluginUtilsService.createOutputFiles( | ||
tempDirectory, | ||
List.of("out"), | ||
new HashMap<>(Map.of("workingDir", tempDirectory.toAbsolutePath().toString())) | ||
); | ||
|
||
assertThat(outputFilesMap.get("out"), startsWith(tempDirectory.resolve("out_").toString())); | ||
} | ||
} |