Skip to content

Commit ac5e09a

Browse files
sebastiankirschrohanKanojia
authored andcommitted
Add IT test
When setting autoRemove to true (https://docs.docker.com/reference/cli/docker/container/run/#rm), the container wil be removed by the Docker daemon after stopping it. This lets the stop goal fail (up until v0.44.0).
1 parent f4de3af commit ac5e09a

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project>
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<parent>
6+
<groupId>io.fabric8.dmp.itests</groupId>
7+
<artifactId>dmp-it-parent</artifactId>
8+
<version>0.45-SNAPSHOT</version>
9+
<relativePath>../pom.xml</relativePath>
10+
</parent>
11+
12+
<groupId>fabric8io</groupId>
13+
<artifactId>dmp-it-graceful-container-removal</artifactId>
14+
<packaging>pom</packaging>
15+
16+
<build>
17+
<plugins>
18+
<plugin>
19+
<groupId>io.fabric8</groupId>
20+
<artifactId>docker-maven-plugin</artifactId>
21+
<configuration>
22+
<images>
23+
<image>
24+
<name>busybox</name>
25+
<run>
26+
<autoRemove>true</autoRemove>
27+
<wait>
28+
<shutdown>128</shutdown>
29+
</wait>
30+
</run>
31+
</image>
32+
</images>
33+
</configuration>
34+
<executions>
35+
<execution>
36+
<id>start-docker</id>
37+
<goals>
38+
<goal>start</goal>
39+
</goals>
40+
</execution>
41+
<execution>
42+
<id>stop-docker</id>
43+
<goals>
44+
<goal>stop</goal>
45+
</goals>
46+
</execution>
47+
</executions>
48+
</plugin>
49+
</plugins>
50+
</build>
51+
</project>

it/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<module>dockerfile-base-as-arg</module>
3434
<module>dockerfile-base-as-arg-buildconfig</module>
3535
<module>dockerignore</module>
36+
<module>graceful-container-removal</module>
3637
<module>healthcheck</module>
3738
<module>helloworld</module>
3839
<module>log</module>

0 commit comments

Comments
 (0)