예제 #1
0
 def test_full_delete_negative(self):
     client = Mock()
     client.indices.delete.side_effect = fake_fail
     self.assertFalse(curator.delete(client, named_indices))
예제 #2
0
 def test_full_delete_with_disk_space(self):
     client = Mock()
     ds = 2.0
     client.cluster.state.return_value = open_indices
     client.indices.status.return_value = indices_space
     self.assertTrue(curator.delete(client, named_indices, disk_space=ds))
예제 #3
0
 def test_full_delete_exception(self):
     client = Mock()
     client.indices.delete.side_effect = fake_fail
     client.indices.get_settings.return_value = named_indices
     self.assertFalse(curator.delete(client, named_indices))
예제 #4
0
 def test_full_delete_positive(self):
     client = Mock()
     client.indices.delete.return_value = None
     self.assertTrue(curator.delete(client, named_indices))
예제 #5
0
 def test_full_delete_negative(self):
     client = Mock()
     client.info.return_value = {"version": {"number": "1.7.2"}}
     client.indices.delete.return_value = None
     client.indices.get_settings.return_value = named_indices
     self.assertFalse(curator.delete(client, named_indices))
예제 #6
0
 def test_full_delete_negative(self):
     client = Mock()
     client.indices.delete.return_value = None
     client.indices.get_settings.return_value = named_indices
     self.assertFalse(curator.delete(client, named_indices))
예제 #7
0
 def test_full_delete_exception(self):
     client = Mock()
     client.info.return_value = {'version': {'number': '1.7.2'} }
     client.indices.delete.side_effect = fake_fail
     client.indices.get_settings.return_value = named_indices
     self.assertFalse(curator.delete(client, named_indices))
예제 #8
0
 def test_full_delete_negative(self):
     client = Mock()
     client.info.return_value = {'version': {'number': '1.7.2'} }
     client.indices.delete.return_value = None
     client.indices.get_settings.return_value = named_indices
     self.assertFalse(curator.delete(client, named_indices))
예제 #9
0
 def test_full_delete_negative(self):
     client = Mock()
     client.indices.delete.side_effect = fake_fail
     self.assertFalse(curator.delete(client, named_indices))
예제 #10
0
 def test_full_delete_positive(self):
     client = Mock()
     client.indices.delete.return_value = None
     self.assertTrue(curator.delete(client, named_indices))
예제 #11
0
 def test_full_delete_negative(self):
     client = Mock()
     client.indices.delete.return_value = None
     client.indices.get_settings.return_value = named_indices
     self.assertFalse(curator.delete(client, named_indices))