コード例 #1
0
 def test_nodes_solo_382(self, mock_subprocess, mock_cmp_pkgrevno):
     '''Ensure cluster_status can be parsed for a single unit deployment'''
     mock_subprocess.check_output.return_value = \
         RABBITMQCTL_CLUSTERSTATUS_SOLO_382
     mock_cmp_pkgrevno.return_value = 0
     self.assertEqual(rabbit_utils.nodes(),
                      ['rabbit@juju-devel3-machine-14'])
コード例 #2
0
 def test_nodes(self, mock_subprocess):
     '''Ensure cluster_status can be parsed for a clustered deployment'''
     mock_subprocess.check_output.return_value = \
         RABBITMQCTL_CLUSTERSTATUS_RUNNING
     self.assertEqual(rabbit_utils.nodes(), [
         'rabbit@juju-devel3-machine-14', 'rabbit@juju-devel3-machine-19',
         'rabbit@juju-devel3-machine-42'
     ])
コード例 #3
0
 def test_nodes(self, mock_subprocess):
     '''Ensure cluster_status can be parsed for a clustered deployment'''
     mock_subprocess.check_output.return_value = \
         RABBITMQCTL_CLUSTERSTATUS_RUNNING
     self.assertEqual(rabbit_utils.nodes(),
                      ['rabbit@juju-devel3-machine-14',
                       'rabbit@juju-devel3-machine-19',
                       'rabbit@juju-devel3-machine-42'])
コード例 #4
0
 def test_nodes_solo(self, mock_subprocess):
     '''Ensure cluster_status can be parsed for a single unit deployment'''
     mock_subprocess.check_output.return_value = \
         RABBITMQCTL_CLUSTERSTATUS_SOLO
     self.assertEqual(rabbit_utils.nodes(),
                      ['rabbit@juju-devel3-machine-14'])