Skip to content

Commit 5458605

Browse files
committed
Changes for service tests to pass in docker master
- update config structure has new members - service name update is no longer supported Signed-off-by: Alessandro Boch <[email protected]>
1 parent 8bf5be6 commit 5458605

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

tests/integration/service_test.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,10 @@ def test_create_service_with_update_config(self):
150150
)
151151
svc_info = self.client.inspect_service(svc_id)
152152
assert 'UpdateConfig' in svc_info['Spec']
153-
assert update_config == svc_info['Spec']['UpdateConfig']
153+
uc = svc_info['Spec']['UpdateConfig']
154+
assert update_config['Parallelism'] == uc['Parallelism']
155+
assert update_config['Delay'] == uc['Delay']
156+
assert update_config['FailureAction'] == uc['FailureAction']
154157

155158
def test_create_service_with_restart_policy(self):
156159
container_spec = docker.types.ContainerSpec('busybox', ['true'])
@@ -166,15 +169,3 @@ def test_create_service_with_restart_policy(self):
166169
svc_info = self.client.inspect_service(svc_id)
167170
assert 'RestartPolicy' in svc_info['Spec']['TaskTemplate']
168171
assert policy == svc_info['Spec']['TaskTemplate']['RestartPolicy']
169-
170-
def test_update_service_name(self):
171-
name, svc_id = self.create_simple_service()
172-
svc_info = self.client.inspect_service(svc_id)
173-
svc_version = svc_info['Version']['Index']
174-
new_name = self.get_service_name()
175-
assert self.client.update_service(
176-
svc_id, svc_version, name=new_name,
177-
task_template=svc_info['Spec']['TaskTemplate']
178-
)
179-
svc_info = self.client.inspect_service(svc_id)
180-
assert svc_info['Spec']['Name'] == new_name

0 commit comments

Comments
 (0)