From 6bfb23baaa45b1ab4bd8c4b1cbce2b49753643d1 Mon Sep 17 00:00:00 2001 From: Jesus Date: Sat, 27 Feb 2016 18:25:54 +0100 Subject: [PATCH] Display containers name when scale a container Display in the log output the name of those containers created using the scale command and change the test_scale_with_api_error test to support the containers name when scale Signed-off-by: Jesus Rodriguez Tinoco --- compose/service.py | 2 +- tests/integration/service_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compose/service.py b/compose/service.py index e1b0c9166..a24b9733b 100644 --- a/compose/service.py +++ b/compose/service.py @@ -223,7 +223,7 @@ class Service(object): parallel_execute( container_numbers, lambda n: create_and_start(service=self, number=n), - lambda n: n, + lambda n: self.get_container_name(n), "Creating and starting" ) diff --git a/tests/integration/service_test.py b/tests/integration/service_test.py index 4bb625a1b..6d0c97db3 100644 --- a/tests/integration/service_test.py +++ b/tests/integration/service_test.py @@ -735,7 +735,7 @@ class ServiceTest(DockerClientTestCase): self.assertEqual(len(service.containers()), 1) self.assertTrue(service.containers()[0].is_running) - self.assertIn("ERROR: for 2 Boom", mock_stderr.getvalue()) + self.assertIn("ERROR: for composetest_web_2 Boom", mock_stderr.getvalue()) def test_scale_with_unexpected_exception(self): """Test that when scaling if the API returns an error, that is not of type