From 344a8028f80baf85c7e118b07230c9ba3e334e03 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Mon, 31 Oct 2016 16:38:33 -0400 Subject: [PATCH] Add analysis-ukrainian plugin to packaging tests This commit adds the analysis-ukrainian plugin to the packaging tests. Relates #21219 --- .../scripts/module_and_plugin_test_cases.bash | 8 ++++++++ .../resources/packaging/scripts/plugins.bash | 20 +++++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/qa/vagrant/src/test/resources/packaging/scripts/module_and_plugin_test_cases.bash b/qa/vagrant/src/test/resources/packaging/scripts/module_and_plugin_test_cases.bash index d5dc095e70f..fbc0f4a887a 100644 --- a/qa/vagrant/src/test/resources/packaging/scripts/module_and_plugin_test_cases.bash +++ b/qa/vagrant/src/test/resources/packaging/scripts/module_and_plugin_test_cases.bash @@ -205,6 +205,10 @@ fi install_and_check_plugin analysis stempel } +@test "[$GROUP] install ukrainian plugin" { + install_and_check_plugin analysis ukrainian morfologik-fsa-*.jar morfologik-stemming-*.jar +} + @test "[$GROUP] install gce plugin" { install_and_check_plugin discovery gce google-api-client-*.jar } @@ -341,6 +345,10 @@ fi remove_plugin analysis-stempel } +@test "[$GROUP] remove ukrainian plugin" { + remove_plugin analysis-ukrainian +} + @test "[$GROUP] remove gce plugin" { remove_plugin discovery-gce } diff --git a/qa/vagrant/src/test/resources/packaging/scripts/plugins.bash b/qa/vagrant/src/test/resources/packaging/scripts/plugins.bash index 02cae2aeecb..55e7fdfc484 100644 --- a/qa/vagrant/src/test/resources/packaging/scripts/plugins.bash +++ b/qa/vagrant/src/test/resources/packaging/scripts/plugins.bash @@ -129,20 +129,28 @@ install_and_check_plugin() { shift if [ "$prefix" == "-" ]; then - local fullName="$name" + local full_name="$name" else - local fullName="$prefix-$name" + local full_name="$prefix-$name" fi - install_jvm_plugin $fullName "$(readlink -m $fullName-*.zip)" + install_jvm_plugin $full_name "$(readlink -m $full_name-*.zip)" - assert_module_or_plugin_directory "$ESPLUGINS/$fullName" + assert_module_or_plugin_directory "$ESPLUGINS/$full_name" + # analysis plugins have a corresponding analyzers jar if [ $prefix == 'analysis' ]; then - assert_module_or_plugin_file "$ESPLUGINS/$fullName/lucene-analyzers-$name-*.jar" + local analyzer_jar_suffix=$name + # the name of the analyzer jar for the ukrainian plugin does + # not match the name of the plugin, so we have to make an + # exception + if [ $name == 'ukrainian' ]; then + analyzer_jar_suffix='morfologik' + fi + assert_module_or_plugin_file "$ESPLUGINS/$full_name/lucene-analyzers-$analyzer_jar_suffix-*.jar" fi for file in "$@"; do - assert_module_or_plugin_file "$ESPLUGINS/$fullName/$file" + assert_module_or_plugin_file "$ESPLUGINS/$full_name/$file" done }