diff options
author | Joffrey F <joffrey@docker.com> | 2016-12-06 16:58:07 -0800 |
---|---|---|
committer | Joffrey F <joffrey@docker.com> | 2016-12-07 14:51:14 -0800 |
commit | 738cfdcdf96e7ff56f6bb3a4966e337187ba51c4 (patch) | |
tree | 4394765fe0ad73e657f44d739c57f8cf09b60ec5 /tests/integration/api_service_test.py | |
parent | b71f34e948bdf986660989f3e8a052db7bb1335c (diff) | |
download | docker-py-dnephin-add-attachable.tar.gz |
Update code and tests for Engine 1.13 compatibilitydnephin-add-attachable
Makefile now runs tests against Docker 1.13 RC
Signed-off-by: Joffrey F <joffrey@docker.com>
Diffstat (limited to 'tests/integration/api_service_test.py')
-rw-r--r-- | tests/integration/api_service_test.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/tests/integration/api_service_test.py b/tests/integration/api_service_test.py index bdf7c01..04f2fe0 100644 --- a/tests/integration/api_service_test.py +++ b/tests/integration/api_service_test.py @@ -221,15 +221,19 @@ class ServiceTest(BaseAPIIntegrationTest): svc_info = self.client.inspect_service(svc_id) print(svc_info) ports = svc_info['Spec']['EndpointSpec']['Ports'] - assert { - 'PublishedPort': 12562, 'TargetPort': 678, 'Protocol': 'tcp' - } in ports - assert { - 'PublishedPort': 53243, 'TargetPort': 8080, 'Protocol': 'tcp' - } in ports - assert { - 'PublishedPort': 12357, 'TargetPort': 1990, 'Protocol': 'udp' - } in ports + for port in ports: + if port['PublishedPort'] == 12562: + assert port['TargetPort'] == 678 + assert port['Protocol'] == 'tcp' + elif port['PublishedPort'] == 53243: + assert port['TargetPort'] == 8080 + assert port['Protocol'] == 'tcp' + elif port['PublishedPort'] == 12357: + assert port['TargetPort'] == 1990 + assert port['Protocol'] == 'udp' + else: + self.fail('Invalid port specification: {0}'.format(port)) + assert len(ports) == 3 def test_create_service_with_env(self): |