Fix lookup of linked containers for API version 1.20
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
97fe2ee40c
commit
4bf2f8c4f9
6 changed files with 26 additions and 22 deletions
|
|
@ -16,6 +16,7 @@ from compose.cli.command import get_project
|
|||
from compose.cli.docker_client import docker_client
|
||||
from compose.container import Container
|
||||
from tests.integration.testcases import DockerClientTestCase
|
||||
from tests.integration.testcases import get_links
|
||||
from tests.integration.testcases import pull_busybox
|
||||
|
||||
|
||||
|
|
@ -909,7 +910,7 @@ class CLITestCase(DockerClientTestCase):
|
|||
|
||||
web, other, db = containers
|
||||
self.assertEqual(web.human_readable_command, 'top')
|
||||
self.assertTrue({'db', 'other'} <= set(web.links()))
|
||||
self.assertTrue({'db', 'other'} <= set(get_links(web)))
|
||||
self.assertEqual(db.human_readable_command, 'top')
|
||||
self.assertEqual(other.human_readable_command, 'top')
|
||||
|
||||
|
|
@ -931,7 +932,9 @@ class CLITestCase(DockerClientTestCase):
|
|||
self.assertEqual(len(containers), 2)
|
||||
web = containers[1]
|
||||
|
||||
self.assertEqual(set(web.links()), set(['db', 'mydb_1', 'extends_mydb_1']))
|
||||
self.assertEqual(
|
||||
set(get_links(web)),
|
||||
set(['db', 'mydb_1', 'extends_mydb_1']))
|
||||
|
||||
expected_env = set([
|
||||
"FOO=1",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue