5.0 compatibility
This commit is contained in:
@@ -7,6 +7,7 @@ import re
|
||||
from os import walk, environ
|
||||
from os.path import exists, join, dirname, pardir
|
||||
import yaml
|
||||
from shutil import rmtree
|
||||
|
||||
from elasticsearch import TransportError
|
||||
from elasticsearch.compat import string_types
|
||||
@@ -48,6 +49,13 @@ class YamlTestCase(ElasticsearchTestCase):
|
||||
self.last_response = None
|
||||
self._state = {}
|
||||
|
||||
def tearDown(self):
|
||||
super(YamlTestCase, self).tearDown()
|
||||
for repo, definition in self.client.snapshot.get_repository(repository='_all').items():
|
||||
self.client.snapshot.delete_repository(repository=repo)
|
||||
if definition['type'] == 'fs':
|
||||
rmtree('/tmp/%s' % definition['settings']['location'])
|
||||
|
||||
def _resolve(self, value):
|
||||
# resolve variables
|
||||
if isinstance(value, string_types) and value.startswith('$'):
|
||||
|
||||
Reference in New Issue
Block a user