Beispiel #1
0
 def test_add_handles_lm_driver_error(self):
     self.mock_create_lm_session.return_value.resource_driver_mgmt_driver.add_resource_driver.side_effect = lm_drivers.LmDriverException(
         'Mocked error')
     result = self.runner.invoke(
         resourcedriver_cmds.add,
         ['TestEnv', '--url', 'http://mockdriver.example.com'])
     self.assert_has_system_exit(result)
     expected_output = 'TNCO error occurred: Mocked error'
     self.assert_output(result, expected_output)
Beispiel #2
0
 def test_add_handles_lm_driver_error(self):
     self.mock_create_lm_session.return_value.deployment_location_driver.add_location.side_effect = lm_drivers.LmDriverException(
         'Mocked error')
     result = self.runner.invoke(deployment_cmds.add,
                                 ['TestEnv', 'testdl', '--rm', 'rm123'])
     self.assert_has_system_exit(result)
     expected_output = 'TNCO error occurred: Mocked error'
     self.assert_output(result, expected_output)