Skip to content

Commit

Permalink
Add Ipc mode to the config hash
Browse files Browse the repository at this point in the history
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
  • Loading branch information
Anca Iordache committed Apr 13, 2021
1 parent 3eee3e0 commit 3ba41b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions compose/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,7 @@ def image_id():
'image_id': image_id(),
'links': self.get_link_names(),
'net': self.network_mode.id,
'ipc_mode': self.ipc_mode.mode,
'networks': self.networks,
'secrets': self.secrets,
'volumes_from': [
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/service_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def test_get_container_create_options_does_not_mutate_options(self):
assert service.options['environment'] == environment

assert opts['labels'][LABEL_CONFIG_HASH] == \
'689149e6041a85f6fb4945a2146a497ed43c8a5cbd8991753d875b165f1b4de4'
'6da0f3ec0d5adf901de304bdc7e0ee44ec5dd7adb08aebc20fe0dd791d4ee5a8'
assert opts['environment'] == ['also=real']

def test_get_container_create_options_sets_affinity_with_binds(self):
Expand Down Expand Up @@ -700,6 +700,7 @@ def test_config_dict(self):
config_dict = service.config_dict()
expected = {
'image_id': 'abcd',
'ipc_mode': None,
'options': {'image': 'example.com/foo'},
'links': [('one', 'one')],
'net': 'other',
Expand All @@ -723,6 +724,7 @@ def test_config_dict_with_network_mode_from_container(self):
config_dict = service.config_dict()
expected = {
'image_id': 'abcd',
'ipc_mode': None,
'options': {'image': 'example.com/foo'},
'links': [],
'networks': {},
Expand Down

0 comments on commit 3ba41b9

Please sign in to comment.