Exemplo n.º 1
0
 def test_delete_indices_negative(self):
     client = Mock()
     client.indices.delete.side_effect = fake_fail
     self.assertFalse(curator.delete_indices(client, named_indices))
Exemplo n.º 2
0
 def test_delete_indices_negative(self):
     client = Mock()
     client.info.return_value = {"version": {"number": "2.0.0"}}
     client.indices.delete.side_effect = fake_fail
     self.assertFalse(curator.delete_indices(client, named_indices))
Exemplo n.º 3
0
 def test_delete_indices_positive(self):
     client = Mock()
     client.indices.delete.return_value = None
     self.assertTrue(curator.delete_indices(client, named_indices))
Exemplo n.º 4
0
 def test_delete_indices_negative(self):
     client = Mock()
     client.info.return_value = {'version': {'number': '2.0.0'} }
     client.indices.delete.side_effect = fake_fail
     self.assertFalse(curator.delete_indices(client, named_indices))
Exemplo n.º 5
0
 def test_delete_indices_positive(self):
     client = Mock()
     client.info.return_value = {"version": {"number": "2.0.0"}}
     client.indices.delete.return_value = None
     self.assertTrue(curator.delete_indices(client, named_indices))
Exemplo n.º 6
0
 def test_delete_indices_positive(self):
     client = Mock()
     client.info.return_value = {'version': {'number': '2.0.0'} }
     client.indices.delete.return_value = None
     self.assertTrue(curator.delete_indices(client, named_indices))
Exemplo n.º 7
0
 def test_delete_indices_negative(self):
     client = Mock()
     client.indices.delete.side_effect = fake_fail
     self.assertFalse(curator.delete_indices(client, named_indices))
Exemplo n.º 8
0
 def test_delete_indices_positive(self):
     client = Mock()
     client.indices.delete.return_value = None
     self.assertTrue(curator.delete_indices(client, named_indices))
Exemplo n.º 9
0
 def test_index_will_be_deleted(self):
     self.create_index('test_index')
     self.assertTrue(curator.delete_indices(self.client, 'test_index'))
     self.assertFalse(self.client.indices.exists('test_index'))
Exemplo n.º 10
0
 def test_index_will_be_deleted(self):
     self.create_index('test_index')
     self.assertTrue(curator.delete_indices(self.client, 'test_index'))
     self.assertFalse(self.client.indices.exists('test_index'))