Exemplo n.º 1
0
def test_plugin_install_and_uninstall(default_populated_index):
    foldered_name = sdk_utils.get_foldered_name(config.SERVICE_NAME)
    plugin_name = 'analysis-phonetic'
    config.update_app(foldered_name, {'TASKCFG_ALL_ELASTICSEARCH_PLUGINS': plugin_name}, current_expected_task_count)
    config.check_plugin_installed(plugin_name, service_name=foldered_name)

    config.update_app(foldered_name, {'TASKCFG_ALL_ELASTICSEARCH_PLUGINS': ''}, current_expected_task_count)
    config.check_plugin_uninstalled(plugin_name, service_name=foldered_name)
Exemplo n.º 2
0
def test_plugin_install_and_uninstall(default_populated_index):
    plugin_name = 'analysis-phonetic'
    config.update_app(foldered_name,
                      {'TASKCFG_ALL_ELASTICSEARCH_PLUGINS': plugin_name},
                      current_expected_task_count)
    config.check_plugin_installed(plugin_name, service_name=foldered_name)

    config.update_app(foldered_name, {'TASKCFG_ALL_ELASTICSEARCH_PLUGINS': ''},
                      current_expected_task_count)
    config.check_plugin_uninstalled(plugin_name, service_name=foldered_name)
    sdk_plan.wait_for_completed_deployment(foldered_name)
    sdk_plan.wait_for_completed_recovery(foldered_name)
Exemplo n.º 3
0
def test_plugin_install_and_uninstall(default_populated_index):
    foldered_name = sdk_utils.get_foldered_name(config.SERVICE_NAME)
    plugin_name = 'analysis-phonetic'
    marathon_config = sdk_marathon.get_config(foldered_name)
    marathon_config['env']['TASKCFG_ALL_ELASTICSEARCH_PLUGINS'] = plugin_name
    sdk_marathon.update_app(foldered_name, marathon_config)
    config.check_plugin_installed(plugin_name, service_name=foldered_name)

    marathon_config = sdk_marathon.get_config(foldered_name)
    marathon_config['env']['TASKCFG_ALL_ELASTICSEARCH_PLUGINS'] = ""
    sdk_marathon.update_app(foldered_name, marathon_config)
    config.check_plugin_uninstalled(plugin_name, service_name=foldered_name)
Exemplo n.º 4
0
def test_plugin_install_and_uninstall(default_populated_index):
    plugin_name = 'analysis-phonetic'
    marathon_config = sdk_marathon.get_config(FOLDERED_SERVICE_NAME)
    marathon_config['env']['TASKCFG_ALL_ELASTICSEARCH_PLUGINS'] = plugin_name
    sdk_marathon.update_app(FOLDERED_SERVICE_NAME, marathon_config)
    config.check_plugin_installed(
        plugin_name, service_name=FOLDERED_SERVICE_NAME)

    marathon_config = sdk_marathon.get_config(FOLDERED_SERVICE_NAME)
    marathon_config['env']['TASKCFG_ALL_ELASTICSEARCH_PLUGINS'] = ""
    sdk_marathon.update_app(FOLDERED_SERVICE_NAME, marathon_config)
    config.check_plugin_uninstalled(
        plugin_name, service_name=FOLDERED_SERVICE_NAME)
Exemplo n.º 5
0
def test_plugin_install_and_uninstall(default_populated_index):
    plugin_name = 'analysis-phonetic'
    marathon_config = sdk_marathon.get_config(FOLDERED_SERVICE_NAME)
    marathon_config['env']['TASKCFG_ALL_ELASTICSEARCH_PLUGINS'] = plugin_name
    sdk_marathon.update_app(FOLDERED_SERVICE_NAME, marathon_config)
    config.check_plugin_installed(plugin_name,
                                  service_name=FOLDERED_SERVICE_NAME)

    marathon_config = sdk_marathon.get_config(FOLDERED_SERVICE_NAME)
    marathon_config['env']['TASKCFG_ALL_ELASTICSEARCH_PLUGINS'] = ""
    sdk_marathon.update_app(FOLDERED_SERVICE_NAME, marathon_config)
    config.check_plugin_uninstalled(plugin_name,
                                    service_name=FOLDERED_SERVICE_NAME)
Exemplo n.º 6
0
def test_pod_replace_then_immediate_config_update():
    plugin_name = 'analysis-phonetic'

    cfg = sdk_marathon.get_config(foldered_name)
    cfg['env']['TASKCFG_ALL_ELASTICSEARCH_PLUGINS'] = plugin_name
    cfg['env']['UPDATE_STRATEGY'] = 'parallel'

    sdk_cmd.svc_cli(config.PACKAGE_NAME, foldered_name, 'pod replace data-0')

    # issue config update immediately
    sdk_marathon.update_app(foldered_name, cfg)

    # ensure all nodes, especially data-0, get launched with the updated config
    config.check_plugin_installed(plugin_name, service_name=foldered_name)
Exemplo n.º 7
0
def test_pod_replace_then_immediate_config_update():
    foldered_name = sdk_utils.get_foldered_name(config.SERVICE_NAME)
    plugin_name = 'analysis-phonetic'

    cfg = sdk_marathon.get_config(foldered_name)
    cfg['env']['TASKCFG_ALL_ELASTICSEARCH_PLUGINS'] = plugin_name
    cfg['env']['UPDATE_STRATEGY'] = 'parallel'

    sdk_cmd.run_cli('beta-elastic --name={} pod replace data-0'.format(foldered_name))

    # issue config update immediately
    sdk_marathon.update_app(foldered_name, cfg)

    # ensure all nodes, especially data-0, get launched with the updated config
    config.check_plugin_installed(plugin_name, service_name=foldered_name)