mirror of
https://github.com/elastic/eland.git
synced 2025-07-11 00:02:14 +08:00
Removes code duplication in test code
This commit is contained in:
parent
33674088ca
commit
10e1adb680
@ -78,14 +78,7 @@ def _setup_test_nested(es):
|
||||
if __name__ == '__main__':
|
||||
# Create connection to Elasticsearch - use defaults
|
||||
print('Connecting to ES', ELASTICSEARCH_HOST)
|
||||
TEST_SUITE = os.environ.get('TEST_SUITE')
|
||||
if TEST_SUITE == 'xpack':
|
||||
print('Running xpack tests requires SSL. Setting up SSL enabled client')
|
||||
certpath = os.path.join(os.path.dirname(__file__), '../../.ci/certs/ca.crt')
|
||||
print(certpath)
|
||||
es = Elasticsearch(ELASTICSEARCH_HOST, use_ssl=True, verify_certs=True, ca_certs=certpath)
|
||||
else:
|
||||
es = Elasticsearch(ELASTICSEARCH_HOST)
|
||||
es = ES_TEST_CLIENT
|
||||
|
||||
|
||||
_setup_data(es)
|
||||
|
Loading…
x
Reference in New Issue
Block a user