コード例 #1
0
ファイル: test_tron_tools.py プロジェクト: rajacsp/paasta
 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,
         },
     }
コード例 #2
0
ファイル: test_tron_tools.py プロジェクト: zaitsevlab/paasta
 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,
         },
     }