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


##########
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:
   Ok. I wasn't sure how much testing to add here because there are tests over 
there, but I agree it would be a good idea to have a bit more extensive testing 
here.



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