arquillian / arquillian-cube

Control (docker, kubernetes, openshift) containers in your tests with ease!
http://arquillian.org/arquillian-cube/
120 stars 98 forks source link

Mounting a host path into a container does not work using docker-compose file #649

Closed mahnkong closed 7 years ago

mahnkong commented 7 years ago
Issue Overview

A configured host path mount in a docker-compose file is not mounted correctly when the container gets created using arquillian-cube.

Example docker-compose file looks as below:

version: '2'
services:
  nginx:
    image: "nginx:alpine"
    ports:
    - "80"
    volumes:
    - "/tmp/www:/usr/share/nginx/html"
Expected Behaviour

When the container is started, the content of the host directory '/tmp/www' should be available inside the container directory '/usr/share/nginx/html'. This works fine when starting the container using docker-compose

host# ls /tmp/www
>>> test.txt
host# ls docker-compose up -d
>>> Starting nginx_1
host# docker exec -ti nginx_1 sh
container# mount | grep html
>>> /dev/sda1 on /usr/share/nginx/html type ext4 (rw,relatime,errors=remount-ro,data=ordered)
container# ls /usr/share/nginx/html
>>> test.txt
Current Behaviour

When the container ist started by arquillian, the mount looks like this:

container# mount | grep html
>>> /dev/sda6 on /tmp/www:/usr/share/nginx/html type ext4 (rw,relatime,data=ordered)

It seems, that the volume definition was taken as it is and not splitted by ':' into source path and target mount on container.

Steps To Reproduce
  1. create simple arquillian cube test projet
  2. add docker-compose.yml with content as shown above
  3. create directory '/tmp/www' and put a file named 'test.txt' inside it
  4. create test containing following code:

    @RunWith(Arquillian.class)
    public class VolumeMountTest {
    
    @ArquillianResource
    private DockerClient dockerClient;
    
    @Test
    public void testExecuteCommandInContainer() throws InterruptedException {
        String[] command = new String[]{"ls", "/usr/share/nginx/html/test.txt"};
        final ExecCreateCmdResponse execCreateCmdResponse = dockerClient.execCreateCmd("nginx").withAttachStdout(true).withAttachStdin(true).withAttachStderr(true).withTty(true).withCmd(command).exec();
        //Execute the created command
        final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        dockerClient.execStartCmd(execCreateCmdResponse.getId()).withDetach(false).exec(new ExecStartResultCallback(outputStream, System.err)).awaitCompletion();
        assertNotEquals("ls: /usr/share/nginx/html/test.txt: No such file or directory", outputStream.toString().trim());
    }
    }
  5. run the test
Additional Information

Arquillian Core version: 1.1.12.Final Arquillian Cube version: 1.0.0 Docker version:

Client:
 Version:      1.12.6
 API version:  1.24
 Go version:   go1.6.2
 Git commit:   78d1802
 Built:        Tue Jan 31 23:35:14 2017
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.6
 API version:  1.24
 Go version:   go1.6.2
 Git commit:   78d1802
 Built:        Tue Jan 31 23:35:14 2017
 OS/Arch:      linux/amd64

Maven version:

Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T18:29:23+01:00)
Maven home: /home/mahnke/tools/apache-maven-3.2.5
Java version: 1.8.0_121, vendor: Oracle Corporation
Java home: /home/mahnke/tools/jdk1.8.0_121/jre
Default locale: de_DE, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-67-generic", arch: "amd64", family: "unix"

Maven dependency tree:

[INFO] +- org.arquillian.cube:arquillian-cube-docker:pom:1.0.0:test
[INFO] |  +- org.arquillian.cube:arquillian-cube-api:jar:1.0.0:test
[INFO] |  +- org.arquillian.cube:arquillian-cube-spi:jar:1.0.0:test
[INFO] |  |  \- org.arquillian.reporter:arquillian-core-reporter-api:jar:0.0.2:test
[INFO] |  |     \- org.arquillian.reporter:arquillian-reporter-api:jar:0.0.2:test
[INFO] |  +- org.arquillian.cube:arquillian-cube-core:jar:1.0.0:test
[INFO] |  |  +- commons-io:commons-io:jar:2.3:test
[INFO] |  |  +- org.apache.commons:commons-compress:jar:1.5:test
[INFO] |  |  |  \- org.tukaani:xz:jar:1.2:test
[INFO] |  |  \- org.apache.commons:commons-lang3:jar:3.4:test
[INFO] |  +- org.jboss.arquillian.core:arquillian-core-spi:jar:1.1.12.Final:test
[INFO] |  |  \- org.jboss.arquillian.core:arquillian-core-api:jar:1.1.12.Final:test
[INFO] |  +- org.jboss.arquillian.test:arquillian-test-spi:jar:1.1.12.Final:test
[INFO] |  |  \- org.jboss.arquillian.test:arquillian-test-api:jar:1.1.12.Final:test
[INFO] |  +- org.arquillian.spacelift:arquillian-spacelift:jar:1.0.0.Alpha8:test
[INFO] |  |  +- org.arquillian.spacelift:arquillian-spacelift-api:jar:1.0.0.Alpha8:test
[INFO] |  |  \- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-depchain:pom:2.2.4:test
[INFO] |  |     +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-api:jar:2.2.4:test
[INFO] |  |     +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-spi:jar:2.2.4:test
[INFO] |  |     +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-api-maven:jar:2.2.4:test
[INFO] |  |     +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-spi-maven:jar:2.2.4:test
[INFO] |  |     +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-api-maven-archive:jar:2.2.4:test
[INFO] |  |     |  \- org.jboss.shrinkwrap:shrinkwrap-api:jar:1.2.6:test
[INFO] |  |     +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven:jar:2.2.4:test
[INFO] |  |     |  +- org.eclipse.aether:aether-api:jar:1.0.0.v20140518:test
[INFO] |  |     |  +- org.eclipse.aether:aether-impl:jar:1.0.0.v20140518:test
[INFO] |  |     |  +- org.eclipse.aether:aether-spi:jar:1.0.0.v20140518:test
[INFO] |  |     |  +- org.eclipse.aether:aether-util:jar:1.0.0.v20140518:test
[INFO] |  |     |  +- org.eclipse.aether:aether-connector-basic:jar:1.0.0.v20140518:test
[INFO] |  |     |  +- org.eclipse.aether:aether-transport-wagon:jar:1.0.0.v20140518:test
[INFO] |  |     |  +- org.apache.maven:maven-aether-provider:jar:3.2.5:test
[INFO] |  |     |  +- org.apache.maven:maven-model:jar:3.2.5:test
[INFO] |  |     |  +- org.apache.maven:maven-model-builder:jar:3.2.5:test
[INFO] |  |     |  |  \- org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:test
[INFO] |  |     |  +- org.apache.maven:maven-repository-metadata:jar:3.2.5:test
[INFO] |  |     |  +- org.apache.maven:maven-settings:jar:3.2.5:test
[INFO] |  |     |  +- org.apache.maven:maven-settings-builder:jar:3.2.5:test
[INFO] |  |     |  +- org.codehaus.plexus:plexus-interpolation:jar:1.21:test
[INFO] |  |     |  +- org.codehaus.plexus:plexus-utils:jar:3.0.20:test
[INFO] |  |     |  +- org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:test
[INFO] |  |     |  |  \- org.sonatype.plexus:plexus-cipher:jar:1.4:test
[INFO] |  |     |  +- org.apache.maven.wagon:wagon-provider-api:jar:2.6:test
[INFO] |  |     |  +- org.apache.maven.wagon:wagon-file:jar:2.6:test
[INFO] |  |     |  \- org.apache.maven.wagon:wagon-http-lightweight:jar:2.6:test
[INFO] |  |     |     \- org.apache.maven.wagon:wagon-http-shared:jar:2.6:test
[INFO] |  |     |        \- org.jsoup:jsoup:jar:1.7.2:test
[INFO] |  |     \- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven-archive:jar:2.2.4:test
[INFO] |  |        +- org.jboss.shrinkwrap:shrinkwrap-impl-base:jar:1.2.6:test
[INFO] |  |        |  \- org.jboss.shrinkwrap:shrinkwrap-spi:jar:1.2.6:test
[INFO] |  |        +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-spi-maven-archive:jar:2.2.4:test
[INFO] |  |        +- org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.0.M1:test
[INFO] |  |        |  +- javax.enterprise:cdi-api:jar:1.0:test
[INFO] |  |        |  \- org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.0.M1:test
[INFO] |  |        \- org.codehaus.plexus:plexus-compiler-javac:jar:2.3:test
[INFO] |  |           \- org.codehaus.plexus:plexus-compiler-api:jar:2.3:test
[INFO] |  +- com.github.docker-java:docker-java:jar:3.0.6:test
[INFO] |  |  +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.6.4:test
[INFO] |  |  |  +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.6.4:test
[INFO] |  |  |  +- com.fasterxml.jackson.core:jackson-core:jar:2.6.4:test
[INFO] |  |  |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.6.4:test
[INFO] |  |  |  |  \- com.fasterxml.jackson.core:jackson-annotations:jar:2.6.0:test
[INFO] |  |  |  \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.6.4:test
[INFO] |  |  +- org.glassfish.jersey.connectors:jersey-apache-connector:jar:2.23.1:test
[INFO] |  |  |  +- org.glassfish.jersey.core:jersey-common:jar:2.23.1:test
[INFO] |  |  |  |  +- javax.annotation:javax.annotation-api:jar:1.2:test
[INFO] |  |  |  |  +- org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.23.1:test
[INFO] |  |  |  |  \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:test
[INFO] |  |  |  \- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:test
[INFO] |  |  +- org.apache.httpcomponents:httpcore:jar:4.4.5:test
[INFO] |  |  +- org.apache.httpcomponents:httpclient:jar:4.5:test
[INFO] |  |  |  \- commons-logging:commons-logging:jar:1.2:test
[INFO] |  |  +- org.glassfish.jersey.core:jersey-client:jar:2.23.1:test
[INFO] |  |  |  +- org.glassfish.hk2:hk2-api:jar:2.4.0-b34:test
[INFO] |  |  |  |  +- org.glassfish.hk2:hk2-utils:jar:2.4.0-b34:test
[INFO] |  |  |  |  \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.4.0-b34:test
[INFO] |  |  |  +- org.glassfish.hk2.external:javax.inject:jar:2.4.0-b34:test
[INFO] |  |  |  \- org.glassfish.hk2:hk2-locator:jar:2.4.0-b34:test
[INFO] |  |  |     \- org.javassist:javassist:jar:3.18.1-GA:test
[INFO] |  |  +- com.kohlschutter.junixsocket:junixsocket-common:jar:2.0.4:test
[INFO] |  |  |  \- log4j:log4j:jar:1.2.17:test
[INFO] |  |  +- com.kohlschutter.junixsocket:junixsocket-native-common:jar:2.0.4:test
[INFO] |  |  |  \- org.scijava:native-lib-loader:jar:2.0.2:test
[INFO] |  |  +- commons-codec:commons-codec:jar:1.10:test
[INFO] |  |  +- org.slf4j:slf4j-api:jar:1.7.21:test
[INFO] |  |  +- org.slf4j:jcl-over-slf4j:jar:1.7.21:test
[INFO] |  |  +- com.google.guava:guava:jar:19.0:test
[INFO] |  |  +- org.bouncycastle:bcpkix-jdk15on:jar:1.54:test
[INFO] |  |  |  \- org.bouncycastle:bcprov-jdk15on:jar:1.54:test
[INFO] |  |  +- io.netty:netty-codec-http:jar:4.1.3.Final:test
[INFO] |  |  |  \- io.netty:netty-codec:jar:4.1.3.Final:test
[INFO] |  |  +- io.netty:netty-handler:jar:4.1.3.Final:test
[INFO] |  |  |  +- io.netty:netty-buffer:jar:4.1.3.Final:test
[INFO] |  |  |  \- io.netty:netty-transport:jar:4.1.3.Final:test
[INFO] |  |  |     \- io.netty:netty-resolver:jar:4.1.3.Final:test
[INFO] |  |  +- io.netty:netty-handler-proxy:jar:4.1.3.Final:test
[INFO] |  |  |  \- io.netty:netty-codec-socks:jar:4.1.3.Final:test
[INFO] |  |  \- io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.3.Final:test
[INFO] |  |     \- io.netty:netty-common:jar:4.1.3.Final:test
[INFO] |  +- org.yaml:snakeyaml:jar:1.15:test
[INFO] |  \- commons-lang:commons-lang:jar:2.6:test
[INFO] +- org.arquillian.cube:arquillian-cube-docker:jar:1.0.0:test
[INFO] +- org.jboss.arquillian.junit:arquillian-junit-standalone:jar:1.1.12.Final:test
[INFO] |  +- org.jboss.arquillian.junit:arquillian-junit-core:jar:1.1.12.Final:test
[INFO] |  +- org.jboss.arquillian.core:arquillian-core-impl-base:jar:1.1.12.Final:test
[INFO] |  +- org.jboss.arquillian.test:arquillian-test-impl-base:jar:1.1.12.Final:test
[INFO] |  \- org.jboss.arquillian.config:arquillian-config-impl-base:jar:1.1.12.Final:test
[INFO] |     +- org.jboss.arquillian.config:arquillian-config-api:jar:1.1.12.Final:test
[INFO] |     |  \- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-api-base:jar:2.0.0-alpha-10:test
[INFO] |     \- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-spi:jar:2.0.0-alpha-10:test
[INFO] \- junit:junit:jar:4.12:test
[INFO]    \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.506 s
[INFO] Finished at: 2017-03-27T11:54:53+02:00
[INFO] Final Memory: 20M/312M
[INFO] ------------------------------------------------------------------------
lordofthejars commented 7 years ago

Hi, thank you very much for using Arquillian Cube and reporting this, can you send us the console output as well?

mahnkong commented 7 years ago

Please find the requested console output below:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building arquillian-cube-tests 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for javax.enterprise:cdi-api:jar:1.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ arquillian-cube-tests ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/mahnke/src/arquillian-cube-tests/test/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ arquillian-cube-tests ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ arquillian-cube-tests ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 6 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ arquillian-cube-tests ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ arquillian-cube-tests ---
[INFO] Surefire report directory: /home/mahnke/src/arquillian-cube-tests/test/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running de.hansemerkur.infrastruktur.haproxy.tests.VolumeMountTest
Mär 27, 2017 12:33:15 PM org.arquillian.spacelift.Spacelift$SpaceliftInstance <init>
INFORMATION: Initialized Spacelift from defaults, workspace: /home/mahnke/src/arquillian-cube-tests/test, cache: /home/mahnke/.spacelift/cache
CubeDockerConfiguration: 
  serverUri = unix:///var/run/docker.sock
  tlsVerify = false
  dockerServerIp = localhost
  definitionFormat = COMPOSE
  clean = true
  removeVolumes = true
  dockerContainers = containers:
  myhttp:
    alwaysPull: false
    image: nginx:alpine
    killContainer: false
    manual: false
    networkMode: test_default
    networks: [test_default]
    portBindings: !!set {50358->80/tcp: null}
    readonlyRootfs: false
    removeVolumes: true
    volumes: !!set {'/tmp/www:/usr/share/nginx/html': null}
networks:
  test_default: {driver: bridge}

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.614 sec <<< FAILURE!
testExecuteCommandInContainer(de.hansemerkur.infrastruktur.haproxy.tests.VolumeMountTest)  Time elapsed: 0.084 sec  <<< FAILURE!
java.lang.AssertionError: Values should be different. Actual: ls: /usr/share/nginx/html/test.txt: No such file or directory
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failEquals(Assert.java:185)
    at org.junit.Assert.assertNotEquals(Assert.java:161)
    at org.junit.Assert.assertNotEquals(Assert.java:175)
    at de.hansemerkur.infrastruktur.haproxy.tests.VolumeMountTest.testExecuteCommandInContainer(VolumeMountTest.java:28)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.jboss.arquillian.junit.Arquillian$8$1.invoke(Arquillian.java:379)
    at org.jboss.arquillian.junit.standalone.LocalTestMethodExecutor.execute(LocalTestMethodExecutor.java:53)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
    at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:130)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
    at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:92)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
    at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:73)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
    at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:136)
    at org.jboss.arquillian.junit.Arquillian$8.evaluate(Arquillian.java:372)
    at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:246)
    at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:431)
    at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:55)
    at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:260)
    at org.jboss.arquillian.junit.Arquillian$7$1.invoke(Arquillian.java:324)
    at org.jboss.arquillian.junit.standalone.AllLifecycleEventExecutor.execute(AllLifecycleEventExecutor.java:51)
    at org.jboss.arquillian.junit.standalone.AllLifecycleEventExecutor.on(AllLifecycleEventExecutor.java:41)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
    at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:130)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
    at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:92)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
    at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:73)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
    at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.fireCustomLifecycle(EventTestRunnerAdaptor.java:159)
    at org.jboss.arquillian.junit.Arquillian$7.evaluate(Arquillian.java:317)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:205)
    at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:431)
    at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:55)
    at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:219)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:167)
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
    at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

Results :

Failed tests:   testExecuteCommandInContainer(de.hansemerkur.infrastruktur.haproxy.tests.VolumeMountTest): Values should be different. Actual: ls: /usr/share/nginx/html/test.txt: No such file or directory

Tests run: 1, Failures: 1, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.078 s
[INFO] Finished at: 2017-03-27T12:33:19+02:00
[INFO] Final Memory: 17M/429M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project arquillian-cube-tests: There are test failures.
[ERROR] 
[ERROR] Please refer to /home/mahnke/src/arquillian-cube-tests/test/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
lordofthejars commented 7 years ago

Thank you for reporting, tomorrow morning I will take a look and fixing it.

lordofthejars commented 7 years ago

The problem is on binding things, when you create a volume, the docker API also requires you bind them. Working on this now.