mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-19 18:05:41 -05:00
fix(core): rename test application.yml to application-test.yml (#2225)
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -20,7 +20,6 @@ out/
|
||||
### Configurations
|
||||
docker-compose.override.yml
|
||||
cli/src/main/resources/application-*.yml
|
||||
*/src/test/resources/application-test.yml
|
||||
/local
|
||||
|
||||
### Javascript
|
||||
|
||||
@@ -48,7 +48,7 @@ public abstract class AbstractExecutionServiceTest {
|
||||
|
||||
@Test
|
||||
void purge() throws Exception {
|
||||
URL resource = AbstractExecutionServiceTest.class.getClassLoader().getResource("application.yml");
|
||||
URL resource = AbstractExecutionServiceTest.class.getClassLoader().getResource("application-test.yml");
|
||||
File tempFile = File.createTempFile("test", "");
|
||||
Files.copy(new FileInputStream(Objects.requireNonNull(resource).getFile()), tempFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public class InputsTest extends AbstractMemoryRunnerTest {
|
||||
.put("date", "2019-10-06")
|
||||
.put("time", "18:27:49")
|
||||
.put("duration", "PT5M6S")
|
||||
.put("file", Objects.requireNonNull(InputsTest.class.getClassLoader().getResource("application.yml")).getPath())
|
||||
.put("file", Objects.requireNonNull(InputsTest.class.getClassLoader().getResource("application-test.yml")).getPath())
|
||||
.put("json", "{\"a\": \"b\"}")
|
||||
.put("uri", "https://www.google.com")
|
||||
.put("nested.string", "a string")
|
||||
@@ -108,7 +108,7 @@ public class InputsTest extends AbstractMemoryRunnerTest {
|
||||
assertThat(typeds.get("date"), is(LocalDate.parse("2019-10-06")));
|
||||
assertThat(typeds.get("time"), is(LocalTime.parse("18:27:49")));
|
||||
assertThat(typeds.get("duration"), is(Duration.parse("PT5M6S")));
|
||||
assertThat((URI) typeds.get("file"), is(new URI("kestra:///io/kestra/tests/inputs/executions/test/inputs/file/application.yml")));
|
||||
assertThat((URI) typeds.get("file"), is(new URI("kestra:///io/kestra/tests/inputs/executions/test/inputs/file/application-test.yml")));
|
||||
assertThat(
|
||||
CharStreams.toString(new InputStreamReader(storageInterface.get(null, (URI) typeds.get("file")))),
|
||||
is(CharStreams.toString(new InputStreamReader(new FileInputStream((String) inputs.get("file")))))
|
||||
@@ -154,7 +154,7 @@ public class InputsTest extends AbstractMemoryRunnerTest {
|
||||
assertThat(execution.getState().getCurrent(), is(State.Type.SUCCESS));
|
||||
assertThat(
|
||||
(String) execution.findTaskRunsByTaskId("file").get(0).getOutputs().get("value"),
|
||||
matchesRegex("kestra:///io/kestra/tests/inputs/executions/.*/inputs/file/application.yml")
|
||||
matchesRegex("kestra:///io/kestra/tests/inputs/executions/.*/inputs/file/application-test.yml")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,10 +32,10 @@ class ConcatTest {
|
||||
|
||||
void run(Boolean json) throws Exception {
|
||||
RunContext runContext = runContextFactory.of();
|
||||
URL resource = ConcatTest.class.getClassLoader().getResource("application.yml");
|
||||
URL resource = ConcatTest.class.getClassLoader().getResource("application-test.yml");
|
||||
|
||||
File file = new File(Objects.requireNonNull(ConcatTest.class.getClassLoader()
|
||||
.getResource("application.yml"))
|
||||
.getResource("application-test.yml"))
|
||||
.toURI());
|
||||
|
||||
URI put = storageInterface.put(
|
||||
|
||||
@@ -28,7 +28,7 @@ class DeleteTest {
|
||||
@Test
|
||||
void run() throws Exception {
|
||||
RunContext runContext = runContextFactory.of();
|
||||
URL resource = DeleteTest.class.getClassLoader().getResource("application.yml");
|
||||
URL resource = DeleteTest.class.getClassLoader().getResource("application-test.yml");
|
||||
|
||||
URI put = storageInterface.put(
|
||||
null,
|
||||
|
||||
@@ -32,7 +32,7 @@ class LocalFilesTest {
|
||||
StorageInterface storageInterface;
|
||||
|
||||
private URI internalFiles() throws IOException, URISyntaxException {
|
||||
var resource = ConcatTest.class.getClassLoader().getResource("application.yml");
|
||||
var resource = ConcatTest.class.getClassLoader().getResource("application-test.yml");
|
||||
|
||||
return storageInterface.put(
|
||||
null,
|
||||
@@ -53,7 +53,7 @@ class LocalFilesTest {
|
||||
.inputs(Map.of(
|
||||
"hello-input.txt", "Hello Input",
|
||||
"execution.txt", "{{toto}}",
|
||||
"application.yml", storageFile.toString()
|
||||
"application-test.yml", storageFile.toString()
|
||||
))
|
||||
.outputs(List.of("hello-input.txt"))
|
||||
.build();
|
||||
@@ -69,7 +69,7 @@ class LocalFilesTest {
|
||||
assertThat(runContext.tempDir().toFile().list().length, is(2));
|
||||
assertThat(Files.readString(runContext.tempDir().resolve("execution.txt")), is("tata"));
|
||||
assertThat(
|
||||
Files.readString(runContext.tempDir().resolve("application.yml")),
|
||||
Files.readString(runContext.tempDir().resolve("application-test.yml")),
|
||||
is(new String(storageInterface.get(null, storageFile).readAllBytes()))
|
||||
);
|
||||
|
||||
@@ -87,7 +87,7 @@ class LocalFilesTest {
|
||||
.inputs(Map.of(
|
||||
"test/hello-input.txt", "Hello Input",
|
||||
"test/sub/dir/2/execution.txt", "{{toto}}",
|
||||
"test/sub/dir/3/application.yml", storageFile.toString()
|
||||
"test/sub/dir/3/application-test.yml", storageFile.toString()
|
||||
))
|
||||
.outputs(List.of("test/**"))
|
||||
.build();
|
||||
@@ -106,7 +106,7 @@ class LocalFilesTest {
|
||||
is("tata")
|
||||
);
|
||||
assertThat(
|
||||
new String(storageInterface.get(null, outputs.getUris().get("test/sub/dir/3/application.yml"))
|
||||
new String(storageInterface.get(null, outputs.getUris().get( "test/sub/dir/3/application-test.yml"))
|
||||
.readAllBytes()),
|
||||
is(new String(storageInterface.get(null, storageFile).readAllBytes()))
|
||||
);
|
||||
|
||||
@@ -26,7 +26,7 @@ class SizeTest {
|
||||
@Test
|
||||
void run() throws Exception {
|
||||
RunContext runContext = runContextFactory.of();
|
||||
URL resource = SizeTest.class.getClassLoader().getResource("application.yml");
|
||||
URL resource = SizeTest.class.getClassLoader().getResource("application-test.yml");
|
||||
|
||||
URI put = storageInterface.put(
|
||||
null,
|
||||
|
||||
@@ -84,7 +84,7 @@ class ExecutionControllerTest extends JdbcH2ControllerTest {
|
||||
.put("int", "42")
|
||||
.put("float", "42.42")
|
||||
.put("instant", "2019-10-06T18:27:49Z")
|
||||
.put("file", Objects.requireNonNull(InputsTest.class.getClassLoader().getResource("application.yml")).getPath())
|
||||
.put("file", Objects.requireNonNull(InputsTest.class.getClassLoader().getResource("application-test.yml")).getPath())
|
||||
.build();
|
||||
|
||||
@Test
|
||||
@@ -108,7 +108,7 @@ class ExecutionControllerTest extends JdbcH2ControllerTest {
|
||||
private MultipartBody createInputsFlowBody() {
|
||||
// Trigger execution
|
||||
File applicationFile = new File(Objects.requireNonNull(
|
||||
ExecutionControllerTest.class.getClassLoader().getResource("application.yml")
|
||||
ExecutionControllerTest.class.getClassLoader().getResource("application-test.yml")
|
||||
).getPath());
|
||||
|
||||
File logbackFile = new File(Objects.requireNonNull(
|
||||
|
||||
Reference in New Issue
Block a user