def test_full_delete_negative(self): client = Mock() client.indices.delete.side_effect = fake_fail self.assertFalse(curator.delete(client, named_indices))
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))
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))
def test_full_delete_positive(self): client = Mock() client.indices.delete.return_value = None self.assertTrue(curator.delete(client, named_indices))
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))
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))
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))
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))