arquillian / arquillian-cube

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

docker-compose.yml: unable to extend version: "2" file (with build definition) #1069

Closed schulzp closed 6 years ago

schulzp commented 6 years ago
Issue Overview

Use docker-compose.yml file version: '2' with extends: file + service.

Expected Behaviour

Load service-definition from file referenced in services:extends:file taking version of that file into account.

Current Behaviour

Currently org.arquillian.cube.docker.impl.docker.compose.ContainerBuilder#extend assumes the referenced file is version: 1 with services definitions at root level (line 690).

Steps To Reproduce
  1. create docker-compose-services.yml with version: "2"
  2. create docker-compose-test.yml with version: "2" containing a service definition with extends:file: docker-compose-services.yml and extends:service:<extended-service-name>
  3. create arquillian.xml with <extension name="docker"> and <property name="dockerContainersFile">docker-compose-test.yml</property>
  4. write a simple arquillian test and launch it
Additional Information
<details>
    <dependency>
        <groupId>org.arquillian.cube</groupId>
        <artifactId>arquillian-cube-docker</artifactId>
        <version>1.17.1</version>
        <scope>test</scope>
    </dependency>
</details>