use of org.jboss.as.model.test.ModelTestControllerVersion in project wildfly by wildfly.
the class DatasourcesSubsystemTestCase method testTransformerEAP7Rejection.
/**
* Tests transformation of model from latest version which needs to be rejected in EAP 7.0.0
*
* @throws Exception
*/
private void testTransformerEAP7Rejection(String subsystemXml) throws Exception {
//Use the non-runtime version of the extension which will happen on the HC
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);
PathAddress subsystemAddress = PathAddress.pathAddress(DataSourcesSubsystemRootDefinition.PATH_SUBSYSTEM);
ModelTestUtils.checkFailedTransformedBootOperations(mainServices, eap7ModelVersion, ops, new FailedOperationTransformationConfig().addFailedAttribute(subsystemAddress.append(DataSourceDefinition.PATH_DATASOURCE), new RejectUndefinedAttribute(Constants.CONNECTION_URL.getName())));
}
Aggregations