[KEYCLOAK-8185] add clear method to exportimport resource
This commit is contained in:
parent
c4a651bcac
commit
01051016f5
3 changed files with 20 additions and 6 deletions
|
@ -147,4 +147,16 @@ public class TestingExportImportResource {
|
||||||
String absolutePath = new File(System.getProperty("project.build.directory", "target")).getAbsolutePath();
|
String absolutePath = new File(System.getProperty("project.build.directory", "target")).getAbsolutePath();
|
||||||
return absolutePath;
|
return absolutePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/clear")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public Response clear() {
|
||||||
|
System.clearProperty(REALM_NAME);
|
||||||
|
System.clearProperty(PROVIDER);
|
||||||
|
System.clearProperty(ACTION);
|
||||||
|
System.clearProperty(FILE);
|
||||||
|
|
||||||
|
return Response.ok().build();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,4 +96,9 @@ public interface TestingExportImportResource {
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
public String getExportImportTestDirectory();
|
public String getExportImportTestDirectory();
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/clear")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public Response clear();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -492,7 +492,6 @@ public class BrokerLinkAndTokenExchangeTest extends AbstractServletsAdapterTest
|
||||||
testExternalExchange();
|
testExternalExchange();
|
||||||
testingClient.testing().exportImport().setProvider(SingleFileExportProviderFactory.PROVIDER_ID);
|
testingClient.testing().exportImport().setProvider(SingleFileExportProviderFactory.PROVIDER_ID);
|
||||||
String targetFilePath = testingClient.testing().exportImport().getExportImportTestDirectory() + File.separator + "singleFile-full.json";
|
String targetFilePath = testingClient.testing().exportImport().getExportImportTestDirectory() + File.separator + "singleFile-full.json";
|
||||||
//System.out.println("TARGET PATH: " + targetFilePath);
|
|
||||||
testingClient.testing().exportImport().setFile(targetFilePath);
|
testingClient.testing().exportImport().setFile(targetFilePath);
|
||||||
testingClient.testing().exportImport().setAction(ExportImportConfig.ACTION_EXPORT);
|
testingClient.testing().exportImport().setAction(ExportImportConfig.ACTION_EXPORT);
|
||||||
testingClient.testing().exportImport().setRealmName(CHILD_IDP);
|
testingClient.testing().exportImport().setRealmName(CHILD_IDP);
|
||||||
|
@ -502,12 +501,10 @@ public class BrokerLinkAndTokenExchangeTest extends AbstractServletsAdapterTest
|
||||||
testingClient.testing().exportImport().setAction(ExportImportConfig.ACTION_IMPORT);
|
testingClient.testing().exportImport().setAction(ExportImportConfig.ACTION_IMPORT);
|
||||||
|
|
||||||
testingClient.testing().exportImport().runImport();
|
testingClient.testing().exportImport().runImport();
|
||||||
//System.out.println("************* AFTER IMPORT");
|
|
||||||
|
testingClient.testing().exportImport().clear();
|
||||||
|
|
||||||
testExternalExchange();
|
testExternalExchange();
|
||||||
//Thread.sleep(1000000000l);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue