Beispiel #1
0
 def test_cluster_commit(self):
     '''
     Test for Commit Cluster Changes
     '''
     with patch.dict(riak.__salt__,
                     {'cmd.retcode': MagicMock(return_value=False)}):
         self.assertTrue(riak.cluster_commit())
Beispiel #2
0
 def test_cluster_commit(self):
     '''
     Test for Commit Cluster Changes
     '''
     with patch.dict(riak.__salt__, {'cmd.retcode':
                                     MagicMock(return_value=False)}):
         self.assertTrue(riak.cluster_commit())
Beispiel #3
0
 def test_cluster_commit(self):
     '''
     Test for Commit Cluster Changes
     '''
     with patch.object(riak, '__execute_cmd', return_value={'retcode': 0, 'stdout': 'success'}):
         self.assertEqual(
             riak.cluster_commit(), {'success': True, 'comment': 'success'}
         )
Beispiel #4
0
 def test_cluster_commit(self):
     """
     Test for Commit Cluster Changes
     """
     with patch.object(
         riak, "__execute_cmd", return_value={"retcode": 0, "stdout": "success"}
     ):
         self.assertEqual(
             riak.cluster_commit(), {"success": True, "comment": "success"}
         )