Merge pull request #67 from orchardup/link-services-to-themselves

Link services to themselves
This commit is contained in:
Ben Firshman 2014-01-31 02:46:52 -08:00
commit 62607f4f04
3 changed files with 16 additions and 2 deletions

View file

@ -155,8 +155,13 @@ class ServiceTest(DockerClientTestCase):
web.start_container()
self.assertIn('figtest_db_1', web.containers()[0].links())
self.assertIn('db_1', web.containers()[0].links())
db.stop(timeout=1)
web.stop(timeout=1)
def test_start_container_creates_links_to_its_own_service(self):
db1 = self.create_service('db')
db2 = self.create_service('db')
db1.start_container()
db2.start_container()
self.assertIn('db_1', db2.containers()[0].links())
def test_start_container_builds_images(self):
service = Service(