Sfoglia il codice sorgente

Add --quiet parameter to docker-compose pull, using existing silent flag

Signed-off-by: Joel Barciauskas <[email protected]>
Joel Barciauskas 8 anni fa
parent
commit
aee944393e
2 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 1 1
      compose/project.py
  2. 4 0
      tests/acceptance/cli_test.py

+ 1 - 1
compose/project.py

@@ -496,7 +496,7 @@ class Project(object):
 
 
         if parallel_pull:
         if parallel_pull:
             def pull_service(service):
             def pull_service(service):
-                service.pull(ignore_pull_failures, True)
+                service.pull(ignore_pull_failures, True, silent=silent)
 
 
             _, errors = parallel.parallel_execute(
             _, errors = parallel.parallel_execute(
                 services,
                 services,

+ 4 - 0
tests/acceptance/cli_test.py

@@ -463,6 +463,10 @@ class CLITestCase(DockerClientTestCase):
                                  re.compile('''^(ERROR: )?(b')?.* nonexisting-image''',
                                  re.compile('''^(ERROR: )?(b')?.* nonexisting-image''',
                                             re.MULTILINE))
                                             re.MULTILINE))
 
 
+    def test_pull_with_quiet(self):
+        assert self.dispatch(['pull', '--quiet']).stderr == ''
+        assert self.dispatch(['pull', '--quiet']).stdout == ''
+
     def test_build_plain(self):
     def test_build_plain(self):
         self.base_dir = 'tests/fixtures/simple-dockerfile'
         self.base_dir = 'tests/fixtures/simple-dockerfile'
         self.dispatch(['build', 'simple'])
         self.dispatch(['build', 'simple'])