use of org.jboss.as.test.integration.domain.management.util.WildFlyManagedConfiguration in project wildfly by wildfly.
the class BuildConfigurationTestBase method createConfiguration.
static WildFlyManagedConfiguration createConfiguration(final String domainXmlName, final String hostXmlName, final String testConfiguration, final String hostName, final String hostAddress, final int hostPort) {
final WildFlyManagedConfiguration configuration = new WildFlyManagedConfiguration();
configuration.setHostControllerManagementAddress(hostAddress);
configuration.setHostControllerManagementPort(hostPort);
configuration.setHostCommandLineProperties("-Djboss.domain.master.address=" + masterAddress + " -Djboss.management.native.port=" + hostPort);
configuration.setDomainConfigFile(hackFixDomainConfig(new File(CONFIG_DIR, domainXmlName)).getAbsolutePath());
configuration.setHostConfigFile(hackFixHostConfig(new File(CONFIG_DIR, hostXmlName), hostName, hostAddress).getAbsolutePath());
// TODO this shouldn't be needed
configuration.setHostName(hostName);
final File output = new File("target" + File.separator + "domains" + File.separator + testConfiguration + File.separator + hostName);
// TODO this should not be necessary
new File(output, "configuration").mkdirs();
configuration.setDomainDirectory(output.getAbsolutePath());
return configuration;
}
use of org.jboss.as.test.integration.domain.management.util.WildFlyManagedConfiguration in project wildfly by wildfly.
the class DefaultConfigSmokeTestCase method testStandardHost.
@Test
public void testStandardHost() throws Exception {
final WildFlyManagedConfiguration config = createConfiguration("domain.xml", "host.xml", getClass().getSimpleName());
final DomainLifecycleUtil utils = new DomainLifecycleUtil(config);
try {
utils.start();
// Double-check server status by confirming server-one can accept a web request to the root
URLConnection connection = new URL("http://" + TestSuiteEnvironment.formatPossibleIpv6Address(masterAddress) + ":8080").openConnection();
connection.connect();
if (Boolean.getBoolean("expression.audit")) {
writeExpressionAudit(utils);
}
} finally {
// Stop
utils.stop();
}
}
use of org.jboss.as.test.integration.domain.management.util.WildFlyManagedConfiguration in project wildfly by wildfly.
the class ExpressionSupportSmokeTestCase method setUp.
@Before
public void setUp() throws IOException {
final WildFlyManagedConfiguration config = createConfiguration("domain.xml", "host.xml", getClass().getSimpleName());
config.setAdminOnly(true);
// Trigger the servers to fail on boot if there are runtime errors
String hostProps = config.getHostCommandLineProperties();
hostProps = hostProps == null ? "" : hostProps;
config.setHostCommandLineProperties(hostProps + "\n-Djboss.unsupported.fail-boot-on-runtime-failure=true");
domainMasterLifecycleUtil = new DomainLifecycleUtil(config);
// domainMasterLifecycleUtil.getConfiguration().addHostCommandLineProperty("-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=y");
// Start
domainMasterLifecycleUtil.start();
conflicts = noSimple = noSimpleCollection = noComplexList = noComplexProperty = noObject = noComplexProperty = supportedUndefined = simple = simpleCollection = object = complexProperty = complexList = 0;
}
use of org.jboss.as.test.integration.domain.management.util.WildFlyManagedConfiguration in project wildfly by wildfly.
the class SlaveHostControllerAuthenticationTestCase method setupDomain.
@BeforeClass
public static void setupDomain() throws Exception {
// Set up a domain with a master that doesn't support local auth so slaves have to use configured credentials
testSupport = DomainTestSupport.create(DomainTestSupport.Configuration.create(SlaveHostControllerAuthenticationTestCase.class.getSimpleName(), "domain-configs/domain-standard.xml", "host-configs/host-master-no-local.xml", "host-configs/host-secrets.xml"));
// Tweak the callback handler so the master test driver client can authenticate
// To keep setup simple it uses the same credentials as the slave host
WildFlyManagedConfiguration masterConfig = testSupport.getDomainMasterConfiguration();
CallbackHandler callbackHandler = Authentication.getCallbackHandler("slave", RIGHT_PASSWORD, "ManagementRealm");
masterConfig.setCallbackHandler(callbackHandler);
testSupport.start();
domainMasterClient = testSupport.getDomainMasterLifecycleUtil().getDomainClient();
domainSlaveClient = testSupport.getDomainSlaveLifecycleUtil().getDomainClient();
}
use of org.jboss.as.test.integration.domain.management.util.WildFlyManagedConfiguration in project wildfly by wildfly.
the class MixedDomainTestSupport method configWithDisabledAsserts.
private static WildFlyManagedConfiguration configWithDisabledAsserts(String jbossHome) {
WildFlyManagedConfiguration config = new WildFlyManagedConfiguration(jbossHome);
config.setEnableAssertions(false);
return config;
}
Aggregations