kbendick commented on a change in pull request #4467:
URL: https://github.com/apache/iceberg/pull/4467#discussion_r840956250



##########
File path: core/src/test/java/org/apache/iceberg/rest/TestResourcePaths.java
##########
@@ -0,0 +1,149 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iceberg.rest;
+
+import org.apache.iceberg.catalog.Namespace;
+import org.apache.iceberg.catalog.TableIdentifier;
+import org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TestResourcePaths {
+  private final String prefix = "ws/catalog";
+  private final ResourcePaths withPrefix = 
ResourcePaths.forCatalogProperties(ImmutableMap.of("prefix", prefix));
+  private final ResourcePaths withoutPrefix = 
ResourcePaths.forCatalogProperties(ImmutableMap.of());
+
+  @Test
+  public void testConfigPath() {
+    // prefix does not affect the config route because config is merged into 
catalog properties
+    Assert.assertEquals(ResourcePaths.config(), "v1/config");
+  }

Review comment:
       We might consider allowing prefix for the config route as well, in case 
somebody wants to use prefix to support several different configs based on the 
full path (maybe a config returned for a different organization depending on 
the prefix).
   
   So they could have:
   `v1/dbas/config & v1/analysts/config` or maybe `v1/customer1/config & 
v1/customer2/config` or even `v1/resource_queue1/config & 
v1/resource_queue2/config` or however else they choose to interpret the use of 
`prefix`.




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