nastra commented on code in PR #11992:
URL: https://github.com/apache/iceberg/pull/11992#discussion_r1922256880
##########
core/src/test/java/org/apache/iceberg/rest/TestRESTCatalog.java:
##########
@@ -489,39 +463,29 @@ public void
testCatalogBearerTokenWithClientCredential(String oauth2ServerUri) {
// use the bearer token for config
Mockito.verify(adapter)
.execute(
- eq(HTTPMethod.GET),
- eq("v1/config"),
- any(),
- any(),
+ reqMatcher(HTTPMethod.GET, "v1/config", catalogHeaders),
eq(ConfigResponse.class),
- eq(catalogHeaders),
+ any(),
any());
// use the bearer token to fetch the context token
Mockito.verify(adapter)
.execute(
- eq(HTTPMethod.POST),
- eq(oauth2ServerUri),
- any(),
- any(),
+ reqMatcher(HTTPMethod.POST, oauth2ServerUri, catalogHeaders),
eq(OAuthTokenResponse.class),
- eq(catalogHeaders),
+ any(),
any());
// use the context token for table existence check
Mockito.verify(adapter)
.execute(
- eq(HTTPMethod.HEAD),
- eq("v1/namespaces/ns/tables/table"),
+ reqMatcher(HTTPMethod.HEAD, "v1/namespaces/ns/tables/table",
contextHeaders),
any(),
any(),
- any(),
- eq(contextHeaders),
any());
}
@ParameterizedTest
@ValueSource(strings = {"v1/oauth/tokens", "https://auth-server.com/token"})
public void testCatalogCredentialWithClientCredential(String
oauth2ServerUri) {
- Map<String, String> emptyHeaders = ImmutableMap.of();
Review Comment:
same as above
--
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]