Skip to content

Commit

Permalink
Added missing spec tests in Clickhouse Destination (#26392)
Browse files Browse the repository at this point in the history
  • Loading branch information
StellaMaUCI committed May 23, 2023
1 parent 928cc09 commit fda4a9f
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,24 @@ void testJdbcAdditionalProperty() throws Exception {
assertNotNull(spec.getConnectionSpecification().get("properties").get(JdbcUtils.JDBC_URL_PARAMS_KEY));
}

@Test
void testHostMissing() {
final JsonNode config = Jsons.deserialize(CONFIGURATION);
((ObjectNode) config).remove("host");
assertFalse(validator.test(schema, config));
}

@Test
void testPortMissing() {
final JsonNode config = Jsons.deserialize(CONFIGURATION);
((ObjectNode) config).remove("port");
assertFalse(validator.test(schema, config));
}

@Test
void testUsernameMissing() {
final JsonNode config = Jsons.deserialize(CONFIGURATION);
((ObjectNode) config).remove("username");
assertFalse(validator.test(schema, config));
}
}

0 comments on commit fda4a9f

Please sign in to comment.