From 193558a4bce1980676d9fd3d9d95dfb020f3c415 Mon Sep 17 00:00:00 2001 From: Mark Steve Samson Date: Mon, 3 Mar 2014 08:54:47 +0800 Subject: [PATCH] Add link names test --- tests/service_test.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/service_test.py b/tests/service_test.py index 258d92619..01c1ecabb 100644 --- a/tests/service_test.py +++ b/tests/service_test.py @@ -160,6 +160,13 @@ class ServiceTest(DockerClientTestCase): self.assertIn('figtest_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): db1 = self.create_service('db') db2 = self.create_service('db')