Skip to content

Commit

Permalink
Merge branch 'CYB-171' into build_and_test_ci
Browse files Browse the repository at this point in the history
  • Loading branch information
stas-panasiuk committed Feb 12, 2024
2 parents d86eb40 + f550b5d commit 5079e00
Showing 1 changed file with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,25 @@ public static Stream<Arguments> mappingsData() {

Arguments.of(Collections.singletonMap(GIVEN_TABLE_NAME, ResolvedSchema.of(
Column.physical("column1", DataTypes.STRING()),
Column.physical("column2", DataTypes.STRING()))),
Column.physical("column2", DataTypes.STRING()),
Column.physical("column3", DataTypes.INT()),
Column.physical("column4", DataTypes.BOOLEAN()),
Column.physical("column5", DataTypes.BIGINT()),
Column.physical("column6", DataTypes.DOUBLE()),
Column.physical("column7", DataTypes.FLOAT()),
Column.physical("column8", DataTypes.SMALLINT()),
Column.physical("column9", DataTypes.TINYINT()))),
Collections.singletonMap(GIVEN_SOURCE,
new MappingDto(GIVEN_TABLE_NAME, new ArrayList<>(), Arrays.asList(
new MappingColumnDto("column1", null, null, null, false),
new MappingColumnDto("column2", null, null, null, false))))));
new MappingColumnDto("column2", null, null, null, false),
new MappingColumnDto("column3", null, null, null, false),
new MappingColumnDto("column4", null, null, null, false),
new MappingColumnDto("column5", null, null, null, false),
new MappingColumnDto("column6", null, null, null, false),
new MappingColumnDto("column7", null, null, null, false),
new MappingColumnDto("column8", null, null, null, false),
new MappingColumnDto("column9", null, null, null, false))))));
}

public static Stream<Arguments> mappingsExceptionData() {
Expand Down Expand Up @@ -65,8 +79,8 @@ public static Stream<Arguments> mappingsExceptionData() {
GIVEN_SOURCE, "[ , someName]")),

Arguments.of(Collections.singletonMap(GIVEN_TABLE_NAME, ResolvedSchema.of(
Column.physical("column1", DataTypes.INT()),
Column.physical("column2", DataTypes.INT()),
Column.physical("column1", DataTypes.DATE()),
Column.physical("column2", DataTypes.DATE()),
Column.physical("column3", DataTypes.STRING()))),
Collections.singletonMap(GIVEN_SOURCE,
new MappingDto(GIVEN_TABLE_NAME, new ArrayList<>(), Arrays.asList(
Expand All @@ -78,7 +92,6 @@ public static Stream<Arguments> mappingsExceptionData() {
"Found column mappings of non-string type without transformations for source [%s]: %s",
GIVEN_SOURCE, "[column1]")));
}

@ParameterizedTest
@MethodSource("mappingsData")
void shouldValidateMappings(Map<String, ResolvedSchema> givenTableSchemaMap,
Expand Down

0 comments on commit 5079e00

Please sign in to comment.