mirror of https://github.com/docker/compose.git
Test that names are created correctly
This commit is contained in:
parent
39497f6ee7
commit
2199b62783
|
@ -27,6 +27,7 @@ class ContainersTestCase(ServiceTestCase):
|
|||
foo.start()
|
||||
|
||||
self.assertEqual(len(foo.containers), 1)
|
||||
self.assertEqual(foo.containers[0]['Names'], ['/foo_1'])
|
||||
self.assertEqual(len(bar.containers), 0)
|
||||
|
||||
bar.scale(2)
|
||||
|
@ -34,6 +35,10 @@ class ContainersTestCase(ServiceTestCase):
|
|||
self.assertEqual(len(foo.containers), 1)
|
||||
self.assertEqual(len(bar.containers), 2)
|
||||
|
||||
names = [c['Names'] for c in bar.containers]
|
||||
self.assertIn(['/bar_1'], names)
|
||||
self.assertIn(['/bar_2'], names)
|
||||
|
||||
|
||||
class ScalingTestCase(ServiceTestCase):
|
||||
def setUp(self):
|
||||
|
|
Loading…
Reference in New Issue