nastra commented on code in PR #14749:
URL: https://github.com/apache/iceberg/pull/14749#discussion_r2591775492
##########
core/src/test/java/org/apache/iceberg/rest/TestRESTCatalog.java:
##########
@@ -2894,6 +2896,26 @@ public void testETagWithRegisterTable() {
assertThat(respHeaders).containsEntry(HttpHeaders.ETAG, eTag);
}
+ @Test
+ public void testLoadTableCredentials() {
+ RESTCatalogAdapter adapter = Mockito.spy(new
RESTCatalogAdapter(backendCatalog));
+ RESTCatalog catalog = catalog(adapter);
+
+ catalog.createNamespace(TABLE.namespace());
+ catalog.createTable(TABLE, SCHEMA);
+
+ List<Credential> credentials = catalog.loadTableCredentials(TABLE);
Review Comment:
I guess one way of testing this would be to use the `RESTCatalogAdapter` in
the storage-specific tests
(`TestVendedCredentialsProvider`/`TestOAuth2RefreshCredentialsHandler`/`TestVendedAdlsCredentialProvider`
by starting up a real HTTP server but we would have to see how this looks.
Right now those tests rely on a mock server. The `RESTCatalogAdapter` could
then return dummy credentials for each specific storage provider and each
storage provider would call this endpoint and verify that it successfully got
one credential
--
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]