adutra commented on code in PR #2615:
URL: https://github.com/apache/polaris/pull/2615#discussion_r2363565266
##########
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();
+ }
restCatalog.dropTable(id);
assertThat(restCatalog.tableExists(id)).isFalse();
return loadTableResponse;
}
@ParameterizedTest
- @ValueSource(booleans = {true, false})
- public void testAppendFiles(boolean pathStyle) throws IOException {
+ // TODO: @CsvSource("true,")
Review Comment:
What is the issue with these test cases?
--
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]