use of com.evolveum.midpoint.test.DummyResourceContoller in project midpoint by Evolveum.
the class AbstractImportTest method initSystem.
@Override
public void initSystem(Task initTask, OperationResult initResult) throws Exception {
LOGGER.trace("initSystem");
super.initSystem(initTask, initResult);
repoAddObjectFromFile(SECURITY_POLICY_FILE, initResult);
repoAddObjectFromFile(USER_TEMPLATE_SCHEMA_CONSTRAINTS_FILE, initResult);
// Just initialize the resource, do NOT import resource definition
DummyResourceContoller dummyResourceCtl = DummyResourceContoller.create(null);
dummyResourceCtl.extendSchemaPirate();
dummyConnector = findConnectorByTypeAndVersion(CONNECTOR_DUMMY_TYPE, CONNECTOR_DUMMY_VERSION, initResult);
setDefaultObjectTemplate(UserType.COMPLEX_TYPE, "constrained", USER_TEMPLATE_SCHEMA_CONSTRAINTS_OID, initResult);
}
use of com.evolveum.midpoint.test.DummyResourceContoller in project midpoint by Evolveum.
the class TestMultiConnectorResources method initSystem.
@Override
public void initSystem(Task initTask, OperationResult initResult) throws Exception {
super.initSystem(initTask, initResult);
initDummyResourcePirate(RESOURCE_DUMMY_OPALINE_NAME, RESOURCE_DUMMY_OPALINE_FILE, RESOURCE_DUMMY_OPALINE_OID, initTask, initResult);
DummyResourceContoller opalineScriptController = DummyResourceContoller.create(RESOURCE_DUMMY_OPALINE_SCRIPT_NAME, getDummyResourceObject(RESOURCE_DUMMY_OPALINE_NAME));
dummyResourceCollection.initDummyResource(RESOURCE_DUMMY_OPALINE_SCRIPT_NAME, opalineScriptController);
repoAddObjectFromFile(SECURITY_POLICY_FILE, initResult);
repoAddObjectFromFile(SECURITY_POLICY_BENEVOLENT_FILE, initResult);
repoAddObjectFromFile(PASSWORD_POLICY_BENEVOLENT_FILE, initResult);
repoAddObjectFromFile(USER_JACK_FILE, true, initResult);
repoAddObjectFromFile(USER_GUYBRUSH_FILE, true, initResult);
}
use of com.evolveum.midpoint.test.DummyResourceContoller in project midpoint by Evolveum.
the class TestDependencies method initDummy.
private void initDummy(String name, Task initTask, OperationResult initResult) throws FileNotFoundException, ObjectNotFoundException, SchemaException, SecurityViolationException, CommunicationException, ConfigurationException, ConnectException, SchemaViolationException, ConflictException, ExpressionEvaluationException, InterruptedException {
String resourceOid = getDummyOid(name);
DummyResourceContoller resourceCtl = DummyResourceContoller.create(name.toUpperCase());
resourceCtl.extendSchemaPirate();
// Expected warnings: dependencies
PrismObject<ResourceType> resource = importAndGetObjectFromFileIgnoreWarnings(ResourceType.class, getDummyFile(name), resourceOid, initTask, initResult);
resourceCtl.setResource(resource);
}
use of com.evolveum.midpoint.test.DummyResourceContoller in project midpoint by Evolveum.
the class TestIteration method initSystem.
@Override
public void initSystem(Task initTask, OperationResult initResult) throws Exception {
super.initSystem(initTask, initResult);
initDummyResourcePirate(RESOURCE_DUMMY_PINK_NAME, RESOURCE_DUMMY_PINK_FILE, RESOURCE_DUMMY_PINK_OID, initTask, initResult);
initDummyResourcePirate(RESOURCE_DUMMY_VIOLET_NAME, RESOURCE_DUMMY_VIOLET_FILE, RESOURCE_DUMMY_VIOLET_OID, initTask, initResult);
DummyResourceContoller darkVioletCtl = initDummyResourcePirate(RESOURCE_DUMMY_DARK_VIOLET_NAME, RESOURCE_DUMMY_DARK_VIOLET_FILE, RESOURCE_DUMMY_DARK_VIOLET_OID, initTask, initResult);
darkVioletCtl.getDummyResource().setSyncStyle(DummySyncStyle.SMART);
initDummyResourcePirate(RESOURCE_DUMMY_MAGENTA_NAME, RESOURCE_DUMMY_MAGENTA_FILE, RESOURCE_DUMMY_MAGENTA_OID, initTask, initResult);
initDummyResourceAd(RESOURCE_DUMMY_FUCHSIA_NAME, RESOURCE_DUMMY_FUCHSIA_FILE, RESOURCE_DUMMY_FUCHSIA_OID, initTask, initResult);
initDummyResource(RESOURCE_DUMMY_ASSOCIATE_NAME, RESOURCE_DUMMY_ASSOCIATE_FILE, RESOURCE_DUMMY_ASSOCIATE_OID, initTask, initResult);
addObject(USER_TEMPLATE_ITERATION_FILE);
addObject(USER_TEMPLATE_ITERATION_UNIQUE_EMAIL_FILE);
addObject(USER_TEMPLATE_ITERATION_ASSOCIATE_FILE);
addObject(USER_LARGO_FILE);
assumeAssignmentPolicy(AssignmentPolicyEnforcementType.RELATIVE);
}
use of com.evolveum.midpoint.test.DummyResourceContoller in project midpoint by Evolveum.
the class TestConnectorDummyFake method initSystem.
@Override
public void initSystem(Task initTask, OperationResult initResult) throws Exception {
// Make sure that the connectors are discovered
modelService.postInit(initResult);
// Make sure to call postInit first. This add system config to repo.
// If system is initialized after that then the logging config from system config
// will be used instead of test logging config
super.initSystem(initTask, initResult);
DummyResourceContoller dummyResourceCtl = DummyResourceContoller.create(null, resourceDummy);
dummyResourceCtl.extendSchemaPirate();
dummyResource = dummyResourceCtl.getDummyResource();
dummyResourceCtl.addAccount(ACCOUNT_HERMAN_DUMMY_USERNAME, "Herman Toothrot");
dummyResourceCtl.addAccount(ACCOUNT_GUYBRUSH_DUMMY_USERNAME, "Guybrush Threepwood");
dummyResourceCtl.addAccount(ACCOUNT_JACK_DUMMY_USERNAME, "Jack Sparrow");
}
Aggregations