How to use get_elasticsearch_install_version method in localstack

Best Python code snippet using localstack_python

install.py

Source:install.py Github

copy

Full Screen

...46# TODO: 2019-10-09: Temporarily overwriting DDB, as we're hitting a SIGSEGV JVM crash with the latest version47OVERWRITE_DDB_FILES_IN_DOCKER = False48# set up logger49LOG = logging.getLogger(__name__)50def get_elasticsearch_install_version(version=None):51 if config.SKIP_INFRA_DOWNLOADS:52 return ELASTICSEARCH_DEFAULT_VERSION53 return version or ELASTICSEARCH_DEFAULT_VERSION54def get_elasticsearch_install_dir(version=None):55 version = get_elasticsearch_install_version(version)56 if version == ELASTICSEARCH_DEFAULT_VERSION and not os.path.exists(MARKER_FILE_LIGHT_VERSION):57 # install the default version into a subfolder of the code base58 install_dir = os.path.join(INSTALL_DIR_INFRA, 'elasticsearch')59 else:60 install_dir = os.path.join(config.TMP_FOLDER, 'elasticsearch', version)61 return install_dir62def install_elasticsearch(version=None):63 version = get_elasticsearch_install_version(version)64 install_dir = get_elasticsearch_install_dir(version)65 installed_executable = os.path.join(install_dir, 'bin', 'elasticsearch')66 if not os.path.exists(installed_executable):67 log_install_msg('Elasticsearch (%s)' % version)68 es_url = ELASTICSEARCH_URLS.get(version)69 if not es_url:70 raise Exception('Unable to find download URL for Elasticsearch version "%s"' % version)71 install_dir_parent = os.path.dirname(install_dir)72 mkdir(install_dir_parent)73 # download and extract archive74 tmp_archive = os.path.join(config.TMP_FOLDER, 'localstack.%s' % os.path.basename(es_url))75 download_and_extract_with_retry(es_url, tmp_archive, install_dir_parent)76 elasticsearch_dir = glob.glob(os.path.join(install_dir_parent, 'elasticsearch*'))77 if not elasticsearch_dir:...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run localstack automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful