How to deploy WildFly datasource with Arquillian?

2k views Asked by At

I tried to deploy my datasource as follows:

@Deployment(name = "test", order=2)
static WebArchive createDeployment() {
    ShrinkWrap.createFromZipFile(WebArchive, new File("target/test.war")).addAsWebInfResource(new File("src/test/resources/test-DS.xml"), "test-DS.xml")
}

but it seems that my datasource is ignored, I see no info about deployment in jboss console.

Is there any other possibility to deploy datasource with arquillian?

@Deployment(name = "datasource", order=1)
static ? createDSDeployment() {
    ?
}
1

There are 1 answers

2
Vit Ias On BEST ANSWER

You could use separate standalone*.xml for arquillian testing and specify your datasource there. For instance, in arquillian.xml:

   <configuration>
       ...
       <property name="serverConfig">standalone-test.xml</property>
       ...
   </configuration>

and datasource can be described in the <datasources> section of that standalone