Example #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))
 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))
Example #3
0
 def test_delete_indices_positive(self):
     client = Mock()
     client.indices.delete.return_value = None
     self.assertTrue(curator.delete_indices(client, named_indices))
Example #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))
 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))
Example #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))
Example #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))
Example #8
0
 def test_delete_indices_positive(self):
     client = Mock()
     client.indices.delete.return_value = None
     self.assertTrue(curator.delete_indices(client, named_indices))
Example #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'))
Example #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'))