mirror of https://github.com/docker/compose.git
test --all flag
Signed-off-by: Collins Abitekaniza <abtcolns@gmail.com>
This commit is contained in:
parent
ba1e0311a7
commit
05efe52ccd
|
@ -694,7 +694,7 @@ class TopLevelCommand(object):
|
|||
-q, --quiet Only display IDs
|
||||
--services Display services
|
||||
--filter KEY=VAL Filter services by a property
|
||||
-a, --all Shows all stopped containers
|
||||
-a, --all Show all stopped containers
|
||||
"""
|
||||
if options['--quiet'] and options['--services']:
|
||||
raise UserError('--quiet and --services cannot be combined')
|
||||
|
|
|
@ -599,6 +599,14 @@ class CLITestCase(DockerClientTestCase):
|
|||
assert 'with_build' in running.stdout
|
||||
assert 'with_image' in running.stdout
|
||||
|
||||
def test_ps_all(self):
|
||||
self.project.get_service('simple').create_container(one_off='blahblah')
|
||||
result = self.dispatch(['ps'])
|
||||
assert 'simple-composefile_simple_run_1' not in result.stdout
|
||||
|
||||
result2 = self.dispatch(['ps', '--all'])
|
||||
assert 'simple-composefile_simple_run_1' in result2.stdout
|
||||
|
||||
def test_pull(self):
|
||||
result = self.dispatch(['pull'])
|
||||
assert 'Pulling simple' in result.stderr
|
||||
|
|
Loading…
Reference in New Issue