Remove Docker container after launch script test execution

Closes gh-5059
pull/5146/head
Vedran Pavic 9 years ago committed by Andy Wilkinson
parent 29c7b93640
commit 6540b1f383

@ -206,6 +206,7 @@ public class SysVinitLaunchScriptIT {
DockerClient docker = createClient();
String imageId = buildImage(docker);
String container = createContainer(docker, imageId, script);
try {
copyFilesToContainer(docker, container, script);
docker.startContainerCmd(container).exec();
StringBuilder output = new StringBuilder();
@ -225,6 +226,10 @@ public class SysVinitLaunchScriptIT {
docker.waitContainerCmd(container).exec();
return output.toString();
}
finally {
docker.removeContainerCmd(container).exec();
}
}
private DockerClient createClient() {
DockerClientConfig config = DockerClientConfig.createDefaultConfigBuilder()

Loading…
Cancel
Save