Esempio n. 1
0
 def test_configfile_default_action_not_supported(self):
     tool = Tool()
     tool.set_dc_configurator(
         dc_dir + "/docker-compose.yml",
         configfile_path=conf_dir +
         "/configfile-default-action-not-supported.yaml")
     self.assertRaises(ActionNotSupported, tool.run)
Esempio n. 2
0
 def test_configfile_default_action(self):
     tool_keep = Tool()
     tool_keep.set_dc_configurator(dc_dir + "/docker-compose.yml",
                                   configfile_path=conf_dir +
                                   "/configfile-default-action-keep.yaml")
     tool_keep.run()
     tool_mock = Tool()
     tool_mock.set_dc_configurator(dc_dir + "/docker-compose.yml",
                                   configfile_path=conf_dir +
                                   "/configfile-default-action-mock.yaml")
     tool_mock.run()
     tool_drop = Tool()
     tool_drop.set_dc_configurator(dc_dir + "/docker-compose.yml",
                                   configfile_path=conf_dir +
                                   "/configfile-default-action-drop.yaml")
     tool_drop.run()
Esempio n. 3
0
 def test_example_broken_configfile_action(self):
     tool = Tool()
     tool.set_dc_configurator(dc_dir + "/docker-compose.yml",
                              conf_dir + '/configfile-broken-action.yaml')
     self.assertRaises(InvalidConfigfileDefinitionAction, tool.run)
Esempio n. 4
0
 def test_k8s(self):
     tool = Tool()
     tool.set_k8s_configurator(None,
                               configfile_path=conf_dir +
                               "/configfile.yaml")
     tool.run()
Esempio n. 5
0
 def test_dc_mock_source(self):
     tool = Tool()
     tool.set_dc_configurator(dc_dir + "/docker-compose.yml",
                              conf_dir + '/configfile.yaml')
     tool.mock_source = dc_dir + '/../mockintosh/mockintosh.yml'
     tool.run()
Esempio n. 6
0
 def test_dc_empty_mock_source(self):
     tool = Tool()
     tool.set_dc_configurator(dc_dir + "/docker-compose.yml",
                              conf_dir + '/configfile.yaml')
     tool.run()
Esempio n. 7
0
 def test_empty_adapter(self):
     tool = Tool()
     tool.adapter = None
     tool.input = dc_dir + '/docker-compose.yml'
     tool.run()
Esempio n. 8
0
 def test_empty_mock(self):
     tool = Tool()
     tool.mock.mock()
Esempio n. 9
0
 def test_empty_input_file(self):
     tool = Tool()
     tool.set_dc_configurator(dc_dir + "/empty-input-file.yaml",
                              configfile_path=conf_dir +
                              "/configfile-action-not-supported.yaml")
     self.assertRaises(DockerComposeNotInAGoodFormat, tool.run)