collado-mike commented on code in PR #1353:
URL: https://github.com/apache/polaris/pull/1353#discussion_r2070630149
##########
integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisManagementServiceIntegrationTest.java:
##########
@@ -871,6 +874,47 @@ public void testCreatePrincipalAndRotateCredentials() {
// rotation that makes the old secret fall off retention.
}
+ @Test
+ public void testCreateFederatedPrincipalFails() throws
JsonProcessingException {
+ // Create a federated Principal
+ FederatedPrincipal federatedPrincipal =
+ new FederatedPrincipal(
+ true, client.newEntityName("federatedPrincipal"), Map.of(), 0L,
0L, 1);
+
+ // Attempt to create the federated Principal using the managementApi
+ try (Response createPResponse =
+ managementApi
+ .request("v1/principals")
+ .post(
+ Entity.json(
+ "{\"principal\":"
+ + new
ObjectMapper().writeValueAsString(federatedPrincipal)
+ + "}"))) {
+ assertThat(createPResponse).returns(CREATED.getStatusCode(),
Response::getStatus);
Review Comment:
Ah, I modified this test from the previous revision. Let me see if I can
improve the behavior
--
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]