use of org.apache.archiva.rest.api.v2.model.BeanInformation in project archiva by apache.
the class NativeSecurityConfigurationServiceTest method testGetRbacManagers.
@Test
void testGetRbacManagers() {
String token = getAdminToken();
Response response = given().spec(getRequestSpec(token)).contentType(JSON).when().get("rbac_managers").then().statusCode(200).extract().response();
assertNotNull(response);
List<BeanInformation> rbacList = response.getBody().jsonPath().getList("", BeanInformation.class);
assertEquals(2, rbacList.size());
assertTrue(rbacList.stream().anyMatch(bi -> "Database RBAC Manager".equals(bi.getDisplayName())));
assertTrue(rbacList.stream().anyMatch(bi -> "LDAP RBAC Manager".equals(bi.getDisplayName())));
}
use of org.apache.archiva.rest.api.v2.model.BeanInformation in project archiva by apache.
the class NativeSecurityConfigurationServiceTest method testGetUserManagers.
@Test
void testGetUserManagers() {
String token = getAdminToken();
Response response = given().spec(getRequestSpec(token)).contentType(JSON).when().get("user_managers").then().statusCode(200).extract().response();
assertNotNull(response);
List<BeanInformation> usrList = response.getBody().jsonPath().getList("", BeanInformation.class);
assertEquals(2, usrList.size());
assertTrue(usrList.stream().anyMatch(bi -> "LDAP User Manager".equals(bi.getDisplayName())));
assertTrue(usrList.stream().anyMatch(bi -> "Database User Manager".equals(bi.getDisplayName())));
}
Aggregations