bharos commented on code in PR #10652:
URL: https://github.com/apache/gravitino/pull/10652#discussion_r3030076577
##########
iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/service/rest/TestIcebergConfig.java:
##########
@@ -104,26 +99,16 @@ public void testConfigWithNonExistentWarehouses(String
warehouse) {
Assertions.assertEquals(404, resp.getStatus());
}
- @ParameterizedTest
- @ValueSource(strings = {"PREFIX", "", "\\\n\t\\\'", "\u0024", "\100", "[_~"})
- void testIcebergRestValidPrefix(String prefix) {
- String path = injectPrefixToPath(IcebergRestTestUtil.CONFIG_PATH, prefix);
+ @Test
+ public void testConfigRejectsPrefixInUrl() {
+ // Per the Iceberg REST spec, the config endpoint does not accept a prefix.
+ String path = injectPrefixToPath(IcebergRestTestUtil.CONFIG_PATH,
IcebergRestTestUtil.PREFIX);
Response response = getIcebergClientBuilder(path, Optional.empty()).get();
- Assertions.assertEquals(Status.OK.getStatusCode(), response.getStatus());
+ Assertions.assertNotEquals(Status.OK.getStatusCode(),
response.getStatus());
Review Comment:
Is it possible to assert the expected status here ? I guess it might be 404
? As injecting a prefix makes the URL `/v1/prefix_gravitino/config` which has
no matching resource in JAX-RS
--
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]