Exemplo n.º 1
0
 def test_failure_starting_when_isgroup(self, svc_authorize_mock,
                                        svc_run_command_mock):
     set_module_args({
         'clustername': 'clustername',
         'domain': 'domain',
         'username': '******',
         'password': '******',
         'name': 'test_name',
         'state': 'started',
         'clean': 'true',
         'isgroup': 'true'
     })
     svc_run_command_mock.return_value = {}
     with pytest.raises(AnsibleFailJson) as exc:
         obj = IBMSVCStartStopReplication()
         obj.start()
     self.assertEqual(True, exc.value.args[0]['failed'])
Exemplo n.º 2
0
 def test_start(self, svc_authorize_mock, svc_run_command_mock):
     set_module_args({
         'clustername': 'clustername',
         'domain': 'domain',
         'username': '******',
         'password': '******',
         'name': 'test_name',
         'state': 'started',
         'clean': 'true'
     })
     svc_run_command_mock.return_value = ''
     obj = IBMSVCStartStopReplication()
     return_data = obj.start()
     self.assertEqual(None, return_data)