Search in sources :

Example 6 with PartialImportResult

use of org.keycloak.partialimport.PartialImportResult in project keycloak by keycloak.

the class PartialImportTest method testAddClients.

@Test
public void testAddClients() throws IOException {
    setFail();
    addClients(false);
    PartialImportResults results = doImport();
    assertEquals(NUM_ENTITIES, results.getAdded());
    for (PartialImportResult result : results.getResults()) {
        String id = result.getId();
        ClientResource clientRsc = testRealmResource().clients().get(id);
        ClientRepresentation client = clientRsc.toRepresentation();
        assertTrue(client.getName().startsWith(CLIENT_PREFIX));
    }
}
Also used : PartialImportResult(org.keycloak.partialimport.PartialImportResult) PartialImportResults(org.keycloak.partialimport.PartialImportResults) ClientResource(org.keycloak.admin.client.resource.ClientResource) ClientRepresentation(org.keycloak.representations.idm.ClientRepresentation) AbstractAuthTest(org.keycloak.testsuite.AbstractAuthTest) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)6 PartialImportResult (org.keycloak.partialimport.PartialImportResult)6 PartialImportResults (org.keycloak.partialimport.PartialImportResults)6 AbstractAuthTest (org.keycloak.testsuite.AbstractAuthTest)6 UserResource (org.keycloak.admin.client.resource.UserResource)3 HashSet (java.util.HashSet)2 ClientResource (org.keycloak.admin.client.resource.ClientResource)2 AdminEventRepresentation (org.keycloak.representations.idm.AdminEventRepresentation)2 ClientRepresentation (org.keycloak.representations.idm.ClientRepresentation)2 UserRepresentation (org.keycloak.representations.idm.UserRepresentation)2 AuthorizationResource (org.keycloak.admin.client.resource.AuthorizationResource)1 IdentityProviderResource (org.keycloak.admin.client.resource.IdentityProviderResource)1 RoleResource (org.keycloak.admin.client.resource.RoleResource)1 IdentityProviderRepresentation (org.keycloak.representations.idm.IdentityProviderRepresentation)1 RoleRepresentation (org.keycloak.representations.idm.RoleRepresentation)1 ResourceServerRepresentation (org.keycloak.representations.idm.authorization.ResourceServerRepresentation)1 EnableFeature (org.keycloak.testsuite.arquillian.annotation.EnableFeature)1