Reputation: 300
I would like to create Arquillian tests that run on a Wildfly server in a Docker container.
I have written Arquillian tests that deploy on a remote Wildfly.
When I set up an unchanged, empty, standalone Wildfly server, Arquillian deploys the tests + dependent ears and then they run without any issue. Awesome!
The next step is to put Wildfly in a Docker container, and let my Arquillian tests run on that containerised Wildfly. As far as I can tell, I have to make sure that
I think I have done that correctly. When I run my Docker image,
When I run the tests, I get
Caused by: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
Weird, since I can get in the browser to the management console just fine.
Does anyone see my oversight? Did I forget anything?
version: '2'
services:
arquillian-cube-wildfly-test:
build: .
ports:
- "8080:8080"
- "9990:9990"
- "8787:8787"
# Base image: Wildfly 10 with 8080 port exposed
FROM jboss/wildfly:10.1.0.Final
# Open management port
EXPOSE 9990
EXPOSE 8787
# Add management user with password
RUN /opt/jboss/wildfly/bin/add-user.sh admin admin --silent
# Set the default command to run on boot
# This will boot WildFly in the standalone mode and bind to all interface
CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"]
Check out https://github.com/stainii/arquillian-cube-and-multiple-deployments-experiment. It's a multi-module Maven project, containing
To run this:
docker-compose up
.mvn clean dependency:copy-dependencies install
. The 2 webapps will be built, their ears will be copied to the target of the test project, and the Arquillian tests will deploy these ears and run tests.Upvotes: 1
Views: 1394
Reputation: 71
There are two issues in your projects.
1.Wrong configuration in arquillian.xml. Check https://git.io/vNaYu for correct configuration of arquillian.xml
2.You are using old version of arquillian-container in your profile arq-widlfly-remote
. It should be
<dependency>
<groupId>org.wildfly.arquillian</groupId>
<artifactId>wildfly-arquillian-container-remote</artifactId>
<version>2.0.0.Final</version>
<scope>test</scope>
</dependency>
Upvotes: 2