use of org.jboss.as.model.test.ModelTestControllerVersion in project wildfly by wildfly.
the class SubsystemTransformerTestCase method testFailedTransformersEAP700.
@Test
public void testFailedTransformersEAP700() throws Exception {
final KernelServicesBuilder builder = createKernelServicesBuilder(AdditionalInitialization.MANAGEMENT);
final ModelVersion legacyVersion = ModelVersion.create(1, 1, 0);
final ModelTestControllerVersion controllerVersion = ModelTestControllerVersion.EAP_7_0_0;
// Add legacy subsystems
builder.createLegacyKernelServicesBuilder(AdditionalInitialization.MANAGEMENT, controllerVersion, legacyVersion).addMavenResourceURL(controllerVersion.getMavenGroupId() + ":wildfly-batch-jberet:" + controllerVersion.getMavenGavVersion()).addMavenResourceURL(controllerVersion.getCoreMavenGroupId() + ":wildfly-threads:" + controllerVersion.getCoreVersion());
final KernelServices mainServices = builder.build();
final KernelServices legacyServices = mainServices.getLegacyServices(legacyVersion);
Assert.assertNotNull(legacyServices);
Assert.assertTrue("main services did not boot", mainServices.isSuccessfulBoot());
Assert.assertTrue(legacyServices.isSuccessfulBoot());
final List<ModelNode> ops = builder.parseXmlResource("/default-subsystem.xml");
ModelTestUtils.checkFailedTransformedBootOperations(mainServices, legacyVersion, ops, new FailedOperationTransformationConfig().addFailedAttribute(PathAddress.pathAddress(BatchSubsystemDefinition.SUBSYSTEM_PATH), new FailedOperationTransformationConfig.NewAttributesConfig(BatchSubsystemDefinition.SECURITY_DOMAIN)));
}
use of org.jboss.as.model.test.ModelTestControllerVersion in project wildfly by wildfly.
the class SubsystemTransformerTestCase method testTransformersEAP700.
@Test
public void testTransformersEAP700() throws Exception {
final KernelServicesBuilder builder = createKernelServicesBuilder(createAdditionalInitialization()).setSubsystemXmlResource("/default-subsystem_1_0.xml");
final ModelVersion legacyVersion = ModelVersion.create(1, 1, 0);
final ModelTestControllerVersion controllerVersion = ModelTestControllerVersion.EAP_7_0_0;
// Add legacy subsystems
builder.createLegacyKernelServicesBuilder(createAdditionalInitialization(), controllerVersion, legacyVersion).addMavenResourceURL(controllerVersion.getMavenGroupId() + ":wildfly-batch-jberet:" + controllerVersion.getMavenGavVersion()).addMavenResourceURL(controllerVersion.getCoreMavenGroupId() + ":wildfly-threads:" + controllerVersion.getCoreVersion());
final KernelServices mainServices = builder.build();
assertTrue(mainServices.isSuccessfulBoot());
final KernelServices legacyServices = mainServices.getLegacyServices(legacyVersion);
assertNotNull(legacyServices);
assertTrue(legacyServices.isSuccessfulBoot());
checkSubsystemModelTransformation(mainServices, legacyVersion, null, false);
}
use of org.jboss.as.model.test.ModelTestControllerVersion in project wildfly by wildfly.
the class Ejb3TransformersTestCase method testRejectionsEAP620.
@Test
public void testRejectionsEAP620() throws Exception {
ModelTestControllerVersion controller = ModelTestControllerVersion.EAP_6_2_0;
this.testRejections(ModelVersion.create(1, 2, 1), controller, formatLegacySubsystemArtifact(controller), formatArtifact("org.jboss.as:jboss-as-threads:%s", controller), LEGACY_EJB_CLIENT_ARTIFACT);
}
use of org.jboss.as.model.test.ModelTestControllerVersion in project wildfly by wildfly.
the class EeSubsystemTestCase method testTransformers800.
//@Test don't test as we dont have test controller
public void testTransformers800() throws Exception {
final ModelVersion legacyModelVersion = ModelVersion.create(3, 0, 0);
final ModelTestControllerVersion controllerVersion = ModelTestControllerVersion.WILDFLY_8_2_0_FINAL;
KernelServicesBuilder builder = createKernelServicesBuilder(AdditionalInitialization.MANAGEMENT);
// Add legacy subsystems
builder.createLegacyKernelServicesBuilder(null, controllerVersion, legacyModelVersion).addMavenResourceURL("org.wildfly:wildfly-ee:" + controllerVersion.getMavenGavVersion());
KernelServices mainServices = builder.build();
KernelServices legacyServices = mainServices.getLegacyServices(legacyModelVersion);
Assert.assertTrue(mainServices.isSuccessfulBoot());
Assert.assertTrue(legacyServices.isSuccessfulBoot());
List<ModelNode> bootOps = builder.parseXmlResource("subsystem-wf8-transformer.xml");
ModelTestUtils.checkFailedTransformedBootOperations(mainServices, legacyModelVersion, bootOps, new FailedOperationTransformationConfig().addFailedAttribute(PathAddress.pathAddress(EeExtension.PATH_SUBSYSTEM, ManagedExecutorServiceResourceDefinition.INSTANCE.getPathElement()), new RejectUndefinedAttribute(new ModelNode(Integer.MAX_VALUE), ManagedExecutorServiceResourceDefinition.CORE_THREADS_AD.getName())).addFailedAttribute(PathAddress.pathAddress(EeExtension.PATH_SUBSYSTEM, ManagedScheduledExecutorServiceResourceDefinition.INSTANCE.getPathElement()), new RejectUndefinedAttribute(new ModelNode(Integer.MAX_VALUE), ManagedScheduledExecutorServiceResourceDefinition.CORE_THREADS_AD.getName())));
}
use of org.jboss.as.model.test.ModelTestControllerVersion in project wildfly by wildfly.
the class DatasourcesSubsystemTestCase method testTransformerEAP7FullConfiguration.
/**
* Tests transformation of model from latest version which works well in EAP 7.0.0 without setting up FailedOperationTransformationConfig.
*
* @throws Exception
*/
private void testTransformerEAP7FullConfiguration(String subsystemXml) throws Exception {
ModelTestControllerVersion eap7ControllerVersion = ModelTestControllerVersion.EAP_7_0_0;
ModelVersion eap7ModelVersion = ModelVersion.create(4, 0, 0);
KernelServicesBuilder builder = createKernelServicesBuilder(AdditionalInitialization.MANAGEMENT);
KernelServices mainServices = initialKernelServices(builder, eap7ControllerVersion, eap7ModelVersion);
List<ModelNode> ops = builder.parseXmlResource(subsystemXml);
ModelTestUtils.checkFailedTransformedBootOperations(mainServices, eap7ModelVersion, ops, FailedOperationTransformationConfig.NO_FAILURES);
}
Aggregations