dimas-b commented on code in PR #4422:
URL: https://github.com/apache/polaris/pull/4422#discussion_r3422582250
##########
runtime/service/src/test/java/org/apache/polaris/service/entity/CatalogEntityTest.java:
##########
@@ -515,4 +588,60 @@ public void testAzureConfigJsonPropertiesPresence() throws
JsonProcessingExcepti
b.setHierarchical(true);
assertThat(MAPPER.writeValueAsString(b.build())).contains("hierarchical");
}
+
+ @ParameterizedTest(name = "[{index}] base={1} within allowed={0}")
+ @CsvSource({"s3://bucket/, s3://bucket/path/to/data", "s3://bucket/,
s3://bucket/"})
+ public void testBaseWithinAllowed_accepted(String allowed, String base) {
+ assertThatCode(
+ () ->
CatalogEntity.validateBaseLocationAgainstAllowedList(List.of(allowed), base))
Review Comment:
We could validate build using `CatalogEntity.Builder.build()`. That would be
more aligned with actual usage of `CatalogEntity` and not require exposing new
methods to the callers (which are not intended for "prod" use).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]