From 738cfdcdf96e7ff56f6bb3a4966e337187ba51c4 Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Tue, 6 Dec 2016 16:58:07 -0800 Subject: Update code and tests for Engine 1.13 compatibility Makefile now runs tests against Docker 1.13 RC Signed-off-by: Joffrey F --- tests/integration/api_service_test.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'tests/integration/api_service_test.py') 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): -- cgit v1.2.1