Test: Fix how packaging test generates expected plugins
This commit is contained in:
parent
243635222a
commit
f1fd5350c9
|
@ -19,12 +19,23 @@
|
|||
|
||||
apply plugin: 'elasticsearch.vagrant'
|
||||
|
||||
dependencies {
|
||||
// Collect all the plugins
|
||||
for (Project subproj : project.rootProject.subprojects) {
|
||||
if (subproj.path.startsWith(':plugins:')) {
|
||||
List<String> plugins = []
|
||||
for (Project subproj : project.rootProject.subprojects) {
|
||||
if (subproj.path.startsWith(':plugins:')) {
|
||||
// add plugin as a dep
|
||||
dependencies {
|
||||
bats project(path: "${subproj.path}", configuration: 'zip')
|
||||
}
|
||||
plugins.add(subproj.name)
|
||||
}
|
||||
}
|
||||
plugins = plugins.toSorted()
|
||||
|
||||
setupBats {
|
||||
doFirst {
|
||||
File expectedPlugins = file('build/plugins/expected')
|
||||
expectedPlugins.parentFile.mkdirs()
|
||||
expectedPlugins.setText(plugins.join('\n'), 'UTF-8')
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -173,8 +173,6 @@ install_and_check_plugin() {
|
|||
# $2 description of the source of the plugin list
|
||||
compare_plugins_list() {
|
||||
cat $1 | sort > /tmp/plugins
|
||||
ls /elasticsearch/plugins/*/build.gradle | cut -d '/' -f 4 |
|
||||
sort > /tmp/expected
|
||||
echo "Checking plugins from $2 (<) against expected plugins (>):"
|
||||
diff /tmp/expected /tmp/plugins
|
||||
diff -w /elasticsearch/qa/vagrant/build/plugins/expected /tmp/plugins
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue