Fix #1961 - docker-compose up should attach to all containers with no service names are specified, and add tests.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
parent
3bee62e4c5
commit
48466d7d82
3 changed files with 37 additions and 6 deletions
|
|
@ -31,6 +31,16 @@ class CLIMainTestCase(unittest.TestCase):
|
|||
log_printer = build_log_printer(containers, service_names, True)
|
||||
self.assertEqual(log_printer.containers, containers[:3])
|
||||
|
||||
def test_build_log_printer_all_services(self):
|
||||
containers = [
|
||||
mock_container('web', 1),
|
||||
mock_container('db', 1),
|
||||
mock_container('other', 1),
|
||||
]
|
||||
service_names = []
|
||||
log_printer = build_log_printer(containers, service_names, True)
|
||||
self.assertEqual(log_printer.containers, containers)
|
||||
|
||||
def test_attach_to_logs(self):
|
||||
project = mock.create_autospec(Project)
|
||||
log_printer = mock.create_autospec(LogPrinter, containers=[])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue