dimas-b commented on code in PR #2615:
URL: https://github.com/apache/polaris/pull/2615#discussion_r2364665382


##########
runtime/service/src/intTest/java/org/apache/polaris/service/it/RestCatalogMinIOSpecialIT.java:
##########
@@ -266,23 +287,45 @@ public LoadTableResponse doTestCreateTable(RESTCatalog 
restCatalog) throws IOExc
     assertThat(response.contentLength()).isGreaterThan(0);
 
     LoadTableResponse loadTableResponse =
-        catalogApi.loadTableWithAccessDelegation(catalogName, id, "ALL");
-    assertThat(loadTableResponse.config())
-        .containsKey("s3.endpoint")
-        .containsEntry(
-            AwsClientProperties.REFRESH_CREDENTIALS_ENDPOINT,
-            "v1/" + catalogName + "/namespaces/test-ns/tables/t1/credentials");
+        catalogApi.loadTable(
+            catalogName,
+            id,
+            "ALL",
+            dm.map(v -> Map.of("X-Iceberg-Access-Delegation", 
v.protocolValue())).orElse(Map.of()));
+
+    assertThat(loadTableResponse.config()).containsKey(ENDPOINT);
+
+    if (dm.map(VENDED_CREDENTIALS::equals).orElse(false)) {
+      assertThat(loadTableResponse.config())
+          .containsEntry(
+              REFRESH_CREDENTIALS_ENDPOINT,
+              "v1/" + catalogName + 
"/namespaces/test-ns/tables/t1/credentials");
+      assertThat(loadTableResponse.credentials()).hasSize(1);
+    } else {
+      
assertThat(loadTableResponse.config()).doesNotContainKey(SECRET_ACCESS_KEY);
+      assertThat(loadTableResponse.config()).doesNotContainKey(ACCESS_KEY_ID);
+      
assertThat(loadTableResponse.config()).doesNotContainKey(REFRESH_CREDENTIALS_ENDPOINT);
+      assertThat(loadTableResponse.credentials()).isEmpty();
+    }

Review Comment:
   Endpoint is validated on line 296



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

Reply via email to