def test_format_master_config(self): master_config = { 'some_key': 101, 'another': 'hello', 'mesos_options': { 'default_volumes': [{ 'container_path': '/nail/tmp', 'host_path': '/nail/tmp', 'mode': 'RW', }], 'other_mesos': True, }, } paasta_volumes = [{ 'containerPath': '/nail/other', 'hostPath': '/other/home', 'mode': 'RW', }] dockercfg = 'file://somewhere' result = tron_tools.format_master_config(master_config, paasta_volumes, dockercfg) assert result == { 'some_key': 101, 'another': 'hello', 'mesos_options': { 'default_volumes': [{ 'container_path': '/nail/other', 'host_path': '/other/home', 'mode': 'RW', }], 'dockercfg_location': dockercfg, 'other_mesos': True, }, }
def test_format_master_config(self): master_config = { "some_key": 101, "another": "hello", "mesos_options": { "default_volumes": [{ "container_path": "/nail/tmp", "host_path": "/nail/tmp", "mode": "RW", }], "other_mesos": True, }, } paasta_volumes = [{ "containerPath": "/nail/other", "hostPath": "/other/home", "mode": "RW" }] dockercfg = "file://somewhere" result = tron_tools.format_master_config(master_config, paasta_volumes, dockercfg) assert result == { "some_key": 101, "another": "hello", "mesos_options": { "default_volumes": [{ "container_path": "/nail/other", "host_path": "/other/home", "mode": "RW", }], "dockercfg_location": dockercfg, "other_mesos": True, }, }