Skip to content

Commit

Permalink
group dataset files (elastic#118739) (elastic#119045)
Browse files Browse the repository at this point in the history
*.csv files used for creating data and *.csv-spec used to define test scenarios are blending in the resource directory.
This change moves all *.csv files to data/*.csv so that it is easier to distinguish between data and specs.
This allows to have a quicker overview of existing data when starting a new spec.
  • Loading branch information
idegtiarenko authored Dec 19, 2024
1 parent 5de28aa commit 023f73f
Show file tree
Hide file tree
Showing 36 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ private static void load(RestClient client, TestsDataset dataset, Logger logger,
if (mapping == null) {
throw new IllegalArgumentException("Cannot find resource " + mappingName);
}
final String dataName = "/" + dataset.dataFileName;
final String dataName = "/data/" + dataset.dataFileName;
URL data = CsvTestsDataLoader.class.getResource(dataName);
if (data == null) {
throw new IllegalArgumentException("Cannot find resource " + dataName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ private static CsvTestsDataLoader.TestsDataset testsDataset(LogicalPlan parsed)
}

private static TestPhysicalOperationProviders testOperationProviders(CsvTestsDataLoader.TestsDataset dataset) throws Exception {
var testData = loadPageFromCsv(CsvTests.class.getResource("/" + dataset.dataFileName()), dataset.typeMapping());
var testData = loadPageFromCsv(CsvTests.class.getResource("/data/" + dataset.dataFileName()), dataset.typeMapping());
return new TestPhysicalOperationProviders(testData.v1(), testData.v2());
}

Expand Down

0 comments on commit 023f73f

Please sign in to comment.