use of org.jboss.as.controller.client.ModelControllerClient in project wildfly by wildfly.
the class CertificateRolesLoginModuleTestCase method stopContainer.
@Test
@InSequence(3)
public void stopContainer() throws Exception {
deployer.undeploy(APP_NAME);
final ModelControllerClient client = TestSuiteEnvironment.getModelControllerClient();
final ManagementClient managementClient = new ManagementClient(client, TestSuiteEnvironment.getServerAddress(), TestSuiteEnvironment.getServerPort(), "http-remoting");
LOGGER.trace("*** reseting test configuration");
AbstractCertificateLoginModuleTestCase.HTTPSConnectorSetup.INSTANCE.tearDown(managementClient, CONTAINER);
SecurityDomainsSetup.INSTANCE.tearDown(managementClient, CONTAINER);
LOGGER.trace("*** stopping container");
containerController.stop(CONTAINER);
}
use of org.jboss.as.controller.client.ModelControllerClient in project wildfly by wildfly.
the class CertificateRolesLoginModuleTestCase method startAndSetupContainer.
@Test
@InSequence(-1)
public void startAndSetupContainer() throws Exception {
LOGGER.trace("*** starting server");
containerController.start(CONTAINER);
ModelControllerClient client = TestSuiteEnvironment.getModelControllerClient();
ManagementClient managementClient = new ManagementClient(client, TestSuiteEnvironment.getServerAddress(), TestSuiteEnvironment.getServerPort(), "http-remoting");
LOGGER.trace("*** will configure server now");
AbstractCertificateLoginModuleTestCase.HTTPSConnectorSetup.INSTANCE.setup(managementClient, CONTAINER);
SecurityDomainsSetup.INSTANCE.setup(managementClient, CONTAINER);
LOGGER.trace("*** reloading server");
executeReloadAndWaitForCompletion(client, 100000);
deployer.deploy(APP_NAME);
}
use of org.jboss.as.controller.client.ModelControllerClient in project wildfly by wildfly.
the class DatabaseCertLoginModuleTestCase method stopContainer.
@Test
@InSequence(3)
public void stopContainer() throws Exception {
deployer.undeploy(APP_NAME);
final ModelControllerClient client = TestSuiteEnvironment.getModelControllerClient();
final ManagementClient managementClient = new ManagementClient(client, TestSuiteEnvironment.getServerAddress(), TestSuiteEnvironment.getServerPort(), "http-remoting");
LOGGER.trace("*** reseting test configuration");
AbstractCertificateLoginModuleTestCase.HTTPSConnectorSetup.INSTANCE.tearDown(managementClient, CONTAINER);
SecurityDomainsSetup.INSTANCE.tearDown(managementClient, CONTAINER);
DBSetup.INSTANCE.tearDown(managementClient, CONTAINER);
DataSourcesSetup.INSTANCE.tearDown(managementClient, CONTAINER);
LOGGER.trace("*** stopping container");
containerController.stop(CONTAINER);
}
use of org.jboss.as.controller.client.ModelControllerClient in project wildfly by wildfly.
the class DatabaseCertLoginModuleTestCase method startAndSetupContainer.
@Test
@InSequence(-1)
public void startAndSetupContainer() throws Exception {
LOGGER.trace("*** starting server");
containerController.start(CONTAINER);
ModelControllerClient client = TestSuiteEnvironment.getModelControllerClient();
ManagementClient managementClient = new ManagementClient(client, TestSuiteEnvironment.getServerAddress(), TestSuiteEnvironment.getServerPort(), "http-remoting");
LOGGER.trace("*** will configure server now");
AbstractCertificateLoginModuleTestCase.HTTPSConnectorSetup.INSTANCE.setup(managementClient, CONTAINER);
DataSourcesSetup.INSTANCE.setup(managementClient, CONTAINER);
DBSetup.INSTANCE.setup(managementClient, CONTAINER);
SecurityDomainsSetup.INSTANCE.setup(managementClient, CONTAINER);
LOGGER.trace("*** reloading server");
executeReloadAndWaitForCompletion(client, 100000);
deployer.deploy(APP_NAME);
}
use of org.jboss.as.controller.client.ModelControllerClient in project wildfly by wildfly.
the class SSLEJBRemoteClientTestCase method prepareServerOnce.
@Before
public void prepareServerOnce() throws Exception {
if (!serverConfigDone) {
// prepare server config and then restart
log.trace("*** preparing server configuration");
ManagementClient managementClient;
log.trace("*** starting server");
container.start(DEFAULT_JBOSSAS);
final ModelControllerClient client = TestSuiteEnvironment.getModelControllerClient();
managementClient = new ManagementClient(client, TestSuiteEnvironment.getServerAddress(), TestSuiteEnvironment.getServerPort(), "http-remoting");
log.trace("*** will configure server now");
SSLRealmSetupTool.setup(managementClient);
log.trace("*** restarting server");
container.stop(DEFAULT_JBOSSAS);
container.start(DEFAULT_JBOSSAS);
managementClient = new ManagementClient(client, TestSuiteEnvironment.getServerAddress(), TestSuiteEnvironment.getServerPort(), "http-remoting");
// write SSL realm config to output - debugging purposes
SSLRealmSetupTool.readSSLRealmConfig(managementClient);
serverConfigDone = true;
} else {
log.trace("*** Server already prepared, skipping config procedure");
}
}
Aggregations