mirror of
https://github.com/docker/compose.git
synced 2025-07-30 09:04:12 +02:00
Add link names test
This commit is contained in:
parent
e38e866626
commit
193558a4bc
@ -160,6 +160,13 @@ class ServiceTest(DockerClientTestCase):
|
|||||||
self.assertIn('figtest_db_1', web.containers()[0].links())
|
self.assertIn('figtest_db_1', web.containers()[0].links())
|
||||||
self.assertIn('db_1', web.containers()[0].links())
|
self.assertIn('db_1', web.containers()[0].links())
|
||||||
|
|
||||||
|
def test_start_container_creates_links_with_names(self):
|
||||||
|
db = self.create_service('db')
|
||||||
|
web = self.create_service('web', links=[(db, 'custom_link_name')])
|
||||||
|
db.start_container()
|
||||||
|
web.start_container()
|
||||||
|
self.assertIn('custom_link_name', web.containers()[0].links())
|
||||||
|
|
||||||
def test_start_container_creates_links_to_its_own_service(self):
|
def test_start_container_creates_links_to_its_own_service(self):
|
||||||
db1 = self.create_service('db')
|
db1 = self.create_service('db')
|
||||||
db2 = self.create_service('db')
|
db2 = self.create_service('db')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user