Stop and remove still-running one-off containers in 'down'
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
a2317dfac2
commit
2bf5e46857
2 changed files with 7 additions and 4 deletions
|
|
@ -371,14 +371,17 @@ class CLITestCase(DockerClientTestCase):
|
|||
wait_on_condition(ContainerCountCondition(self.project, 2))
|
||||
|
||||
self.dispatch(['run', 'web', 'true'])
|
||||
assert len(self.project.containers(one_off=OneOffFilter.only, stopped=True)) == 1
|
||||
self.dispatch(['run', '-d', 'web', 'tail', '-f', '/dev/null'])
|
||||
assert len(self.project.containers(one_off=OneOffFilter.only, stopped=True)) == 2
|
||||
|
||||
result = self.dispatch(['down', '--rmi=local', '--volumes'])
|
||||
assert 'Stopping v2full_web_1' in result.stderr
|
||||
assert 'Stopping v2full_other_1' in result.stderr
|
||||
assert 'Stopping v2full_web_run_2' in result.stderr
|
||||
assert 'Removing v2full_web_1' in result.stderr
|
||||
assert 'Removing v2full_other_1' in result.stderr
|
||||
assert 'Removing v2full_web_run_1' in result.stderr
|
||||
assert 'Removing v2full_web_run_2' in result.stderr
|
||||
assert 'Removing volume v2full_data' in result.stderr
|
||||
assert 'Removing image v2full_web' in result.stderr
|
||||
assert 'Removing image busybox' not in result.stderr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue