Bläddra i källkod

Simplify module or plugin file checks

Jason Tedor 9 år sedan
förälder
incheckning
c3f6ad89ef

+ 3 - 10
qa/vagrant/src/test/resources/packaging/scripts/modules.bash

@@ -32,18 +32,11 @@ check_module() {
     assert_module_or_plugin_directory "$ESMODULES/$name"
 
     for file in "$@"; do
-        assert_module_file "$ESMODULES/$name/$file"
+        assert_module_or_plugin_file "$ESMODULES/$name/$file"
     done
 
-    assert_module_file "$ESMODULES/$name/$name-*.jar"
-    assert_module_file "$ESMODULES/$name/plugin-descriptor.properties"
-}
-
-assert_module_file() {
-    local file=$1
-    shift
-
-    assert_module_or_plugin_file $file
+    assert_module_or_plugin_file "$ESMODULES/$name/$name-*.jar"
+    assert_module_or_plugin_file "$ESMODULES/$name/plugin-descriptor.properties"
 }
 
 check_secure_module() {

+ 2 - 9
qa/vagrant/src/test/resources/packaging/scripts/plugins.bash

@@ -137,20 +137,13 @@ install_and_check_plugin() {
     assert_module_or_plugin_directory "$ESPLUGINS/$fullName"
 
     if [ $prefix == 'analysis' ]; then
-        assert_plugin_file "$ESPLUGINS/$fullName/lucene-analyzers-$name-*.jar"
+        assert_module_or_plugin_file "$ESPLUGINS/$fullName/lucene-analyzers-$name-*.jar"
     fi
     for file in "$@"; do
-        assert_plugin_file "$ESPLUGINS/$fullName/$file"
+        assert_module_or_plugin_file "$ESPLUGINS/$fullName/$file"
     done
 }
 
-assert_plugin_file() {
-    local file=$1
-    shift
-
-    assert_module_or_plugin_file $file
-}
-
 # Compare a list of plugin names to the plugins in the plugins pom and see if they are the same
 # $1 the file containing the list of plugins we want to compare to
 # $2 description of the source of the plugin list