kbendick commented on code in PR #4495:
URL: https://github.com/apache/iceberg/pull/4495#discussion_r847713407


##########
core/src/test/java/org/apache/iceberg/rest/TestRESTCatalog.java:
##########
@@ -72,4 +78,63 @@ protected boolean supportsNamespaceProperties() {
   protected boolean supportsServerSideRetry() {
     return true;
   }
+
+  /* RESTCatalog specific tests */
+
+  @Test
+  public void testConfigRoute() {
+    RESTClient testClient = new RESTClient() {
+      @Override
+      public void head(String path, Consumer<ErrorResponse> errorHandler) {
+        throw new UnsupportedOperationException("Should not be called for 
testConfigRoute");
+      }
+
+      @Override
+      public <T extends RESTResponse> T delete(String path, Class<T> 
responseType,
+                                               Consumer<ErrorResponse> 
errorHandler) {
+        throw new UnsupportedOperationException("Should not be called for 
testConfigRoute");
+      }
+
+      @Override
+      public <T extends RESTResponse> T get(String path, Class<T> 
responseType, Consumer<ErrorResponse> errorHandler) {
+        return (T) RESTCatalogConfigResponse
+            .builder()
+            .withDefaults(ImmutableMap.of())
+            .withOverrides(ImmutableMap.of("cache-enabled", "false"))

Review Comment:
   Added more testing for defaults and overrides being applied. Between that 
and the tests actually in the `RESTCatalogConfigResponse`, things should be 
adequately tested.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to