Search in sources :

Example 1 with WildFlyManagedConfiguration

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;
}
Also used : WildFlyManagedConfiguration(org.jboss.as.test.integration.domain.management.util.WildFlyManagedConfiguration) File(java.io.File)

Example 2 with WildFlyManagedConfiguration

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();
    }
}
Also used : WildFlyManagedConfiguration(org.jboss.as.test.integration.domain.management.util.WildFlyManagedConfiguration) DomainLifecycleUtil(org.jboss.as.test.integration.domain.management.util.DomainLifecycleUtil) URLConnection(java.net.URLConnection) URL(java.net.URL) Test(org.junit.Test)

Example 3 with WildFlyManagedConfiguration

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;
}
Also used : WildFlyManagedConfiguration(org.jboss.as.test.integration.domain.management.util.WildFlyManagedConfiguration) DomainLifecycleUtil(org.jboss.as.test.integration.domain.management.util.DomainLifecycleUtil) Before(org.junit.Before)

Example 4 with WildFlyManagedConfiguration

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();
}
Also used : WildFlyManagedConfiguration(org.jboss.as.test.integration.domain.management.util.WildFlyManagedConfiguration) CallbackHandler(javax.security.auth.callback.CallbackHandler) BeforeClass(org.junit.BeforeClass)

Example 5 with WildFlyManagedConfiguration

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;
}
Also used : WildFlyManagedConfiguration(org.jboss.as.test.integration.domain.management.util.WildFlyManagedConfiguration)

Aggregations

WildFlyManagedConfiguration (org.jboss.as.test.integration.domain.management.util.WildFlyManagedConfiguration)7 DomainLifecycleUtil (org.jboss.as.test.integration.domain.management.util.DomainLifecycleUtil)4 Test (org.junit.Test)3 URL (java.net.URL)2 URLConnection (java.net.URLConnection)2 File (java.io.File)1 CallbackHandler (javax.security.auth.callback.CallbackHandler)1 PathAddress (org.jboss.as.controller.PathAddress)1 ModelNode (org.jboss.dmr.ModelNode)1 Property (org.jboss.dmr.Property)1 Before (org.junit.Before)1 BeforeClass (org.junit.BeforeClass)1