Containers have names which are used to isolate them to their service

This commit is contained in:
Aanand Prasad 2013-12-09 15:00:41 +00:00
commit 4e426e77fa
2 changed files with 47 additions and 2 deletions

View file

@ -39,6 +39,22 @@ class NameTestCase(ServiceTestCase):
Service('_____')
class ContainersTestCase(ServiceTestCase):
def test_containers(self):
foo = self.create_service('foo')
bar = self.create_service('bar')
foo.start()
self.assertEqual(len(foo.containers), 1)
self.assertEqual(len(bar.containers), 0)
bar.scale(2)
self.assertEqual(len(foo.containers), 1)
self.assertEqual(len(bar.containers), 2)
class ScalingTestCase(ServiceTestCase):
def setUp(self):
super(ServiceTestCase, self).setUp()