summaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorJoffrey F <joffrey@docker.com>2018-08-03 14:16:39 -0700
committerJoffrey F <joffrey@docker.com>2018-08-03 14:16:39 -0700
commit8d35ae69b7efd6c2066864e1c0406cdf11fc1a96 (patch)
treeb18bbe80c16a19b3f641dedb85895d6157b1a5a3 /tests/unit
parent64a1d8c69a4689dc7c2c0da0e21323b3396bfa68 (diff)
parentc28ff855429ca50804945d1c3c274fb89aca2ef3 (diff)
downloaddocker-py-8d35ae69b7efd6c2066864e1c0406cdf11fc1a96.tar.gz
Merge branch 'knackworks-service-create-placement-preferences'
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/models_services_test.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/unit/models_services_test.py b/tests/unit/models_services_test.py
index 247bb4a..a4ac50c 100644
--- a/tests/unit/models_services_test.py
+++ b/tests/unit/models_services_test.py
@@ -26,6 +26,8 @@ class CreateServiceKwargsTest(unittest.TestCase):
'mounts': [{'some': 'mounts'}],
'stop_grace_period': 5,
'constraints': ['foo=bar'],
+ 'preferences': ['bar=baz'],
+ 'platforms': [('x86_64', 'linux')],
})
task_template = kwargs.pop('task_template')
@@ -41,7 +43,11 @@ class CreateServiceKwargsTest(unittest.TestCase):
'ContainerSpec', 'Resources', 'RestartPolicy', 'Placement',
'LogDriver', 'Networks'
])
- assert task_template['Placement'] == {'Constraints': ['foo=bar']}
+ assert task_template['Placement'] == {
+ 'Constraints': ['foo=bar'],
+ 'Preferences': ['bar=baz'],
+ 'Platforms': [{'Architecture': 'x86_64', 'OS': 'linux'}],
+ }
assert task_template['LogDriver'] == {
'Name': 'logdriver',
'Options': {'foo': 'bar'}