Esempio 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))
Esempio 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))
Esempio 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))
Esempio 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))
Esempio 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))
Esempio 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))
Esempio 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))
Esempio 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))
Esempio 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'))
Esempio 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'))