示例#1
0
    def test_cluster_join(self):
        '''
        Test for Join a Riak cluster
        '''
        self.assertFalse(riak.cluster_join())

        with patch.dict(riak.__salt__,
                        {'cmd.retcode': MagicMock(return_value=False)}):
            self.assertTrue(riak.cluster_join('A', 'B'))
示例#2
0
    def test_cluster_join(self):
        '''
        Test for Join a Riak cluster
        '''
        self.assertFalse(riak.cluster_join())

        with patch.dict(riak.__salt__, {'cmd.retcode':
                                        MagicMock(return_value=False)}):
            self.assertTrue(riak.cluster_join('A', 'B'))
示例#3
0
 def test_cluster_join(self):
     '''
     Test for Join a Riak cluster
     '''
     with patch.object(riak, '__execute_cmd', return_value={'retcode': 0, 'stdout': 'success'}):
         self.assertEqual(
             riak.cluster_join('A', 'B'), {'success': True, 'comment': 'success'}
         )
示例#4
0
 def test_cluster_join(self):
     """
     Test for Join a Riak cluster
     """
     with patch.object(
         riak, "__execute_cmd", return_value={"retcode": 0, "stdout": "success"}
     ):
         self.assertEqual(
             riak.cluster_join("A", "B"), {"success": True, "comment": "success"}
         )