Commit Graph

132 Commits

Author SHA1 Message Date
Britta Weber d8ff91dbad [test] add lang-expression plugin to vagrant tests
we need this now that #13726 has been merged
2015-09-23 17:55:21 +02:00
Nik Everett 4d47015a0c Merge pull request #13579 from nik9000/run_plugin_as_elasticsearch_in_tar
Run bin/plugin as elasticsearch in tar distro
2015-09-22 11:19:19 -04:00
Nik Everett b521c606ff [test] Run bin/plugin as right user
Before this commit he tests always run bin/plugin as root which is somewhat
unrealistic and causes trouble (log files owned by root instead of
elasticsearch). After this commit `bin/plugin` runs as root when elasticsearch
is installed via the repository and as elasticsearch otherwise which is much
more realistic.

This also adds extra timeout to starting elasticsearch which is required
when all the plugins are installed. And it fixes up a problem with logging
elasticsearch's log if elasticsearch doesn't start which came up multiple
time while debugging this problem.

Also adds docs recommending running `bin/plugin` as the user that owns the
Elasticsearch files or root if installed with the packages.

Closes #13557
2015-09-22 11:17:57 -04:00
Nik Everett fe24bcaa39 [test] Fix plugin tests
Fix the vagrant tests after azure was split into 3 plugins. The tests
need to list all the plugins and some dependency so we can make sure the
plugin can be installed and uninstalled.
2015-09-21 15:47:37 -04:00
Nik Everett 1998c2ca4d Merge pull request #13633 from andrestc/plugins-script-check-java
Adds a validation for plugins script to check if java is set
2015-09-21 14:40:26 -04:00
André Carvalho bb0b661d9b Fix script testing for centos-7 2015-09-20 00:28:25 -03:00
André Carvalho 0213aafaad Limits variable scope 2015-09-18 13:49:05 -03:00
André Carvalho ab1bd5db53 Adds test case for plugins script 2015-09-17 22:22:20 -03:00
André Carvalho 139a65770a Adds test case for elasticsearch script 2015-09-17 22:22:09 -03:00
Britta Weber c9cd70d419 [test] start elasticsearch and verify it does what it should after installing in custom dir 2015-09-17 17:24:13 +02:00
Britta Weber d4161ff938 [test] add test for 'plugin list'
Tests that the plugins that are reported with 'plugin list' are the
same as in the plugins pom.
2015-09-17 10:25:35 +02:00
Nik Everett 8d02efd088 [test] Packaging test for filesystem scripts
Adds a tests for loading scripts from the filesystem for search templates
and for search filters.

Closes #13184
2015-09-16 10:44:21 -04:00
Nik Everett 9257478b47 Merge pull request #13593 from nik9000/sles_vagrant
Add opensuse-13 to packaging tests
2015-09-16 10:12:31 -04:00
Nik Everett 058d385942 [test] Add opensuse-13 to packaging tests
This gets opensuse-13 working with vagrant and the packaging tests. They pass
with some minor tweaks.

Closes #13507
2015-09-16 10:09:39 -04:00
Nik Everett bfc5f47fe2 [test] Fix centos-6 tests
Right now we execute some debian-isms in the init.d tests. This switches to
trying both the debian and centos ways to stop services from starting
automatically.
2015-09-15 17:55:12 -04:00
Nik Everett 606896e4b6 [test] Packaging test for aws plugin's parts
The AWS plugin was broken into discovery-ec2 and repository-s3 so we can't
test the old plugin and must test the new ones.

Fixed some wording issues in test names.
2015-09-10 14:33:33 -04:00
Nik Everett afabdd1569 [test] Start with plugins in package tests
This changes the packaging tests to start Elasticsearch with all plugins
installed and checks `_cat/plugins?h=c` against the list of plugins in
the plugins directory. If the list differs, error! So it proves that the
plugins can be installed using bin/plugin as shipped in the rpm and deb
packages.

Closes #13254
2015-09-10 13:43:50 -04:00
Nik Everett 800fb5f7f5 [test] Document implementation choices
There are two other obvious ways to implement the "packages don't start
elasticsearch" checks but when you work through them they aren't as nice
as the implementation of the checks that we use now. This just adds
documentation to that effect.
2015-09-10 11:58:26 -04:00
Nik Everett 54e78b61b9 [test] Test that packages don't start service
We don't want either the deb or rpm package to start elasticsearch as soon
as they install nor do we want the package to register elasticsearch to
start on restart. That action is reserved for the administrator. This adds
tests for that.

Closes #13122
2015-09-10 11:58:26 -04:00
Nik Everett 8d3df330ff [test] Add test for package reinstall after remove
Closes #13286
2015-09-07 09:07:07 -04:00
Nik Everett 04d254e571 [test] Documentation for packaging tests 2015-09-04 15:34:10 -04:00
Nik Everett ab5c981ed2 [test] Test upgrading from an older version
Adds a test for upgrading from 2.0.0-beta1 to the version of that is built.

Closes #13183
2015-09-02 15:16:53 -04:00
Nik Everett 38147da43e [tests] Fix exit code check for systemctl 2015-09-01 15:24:04 -04:00
Nik Everett 99d2f0463e [packaging] clean up more bats tests
This cleans up deb, rpm, systemd, and sysvinit tests:
1. Move skip_not_rpm, skip_not_dpkg, etc to the setup() methods for faster
runtime and cleaner code.
2. Removed lots of needless invocations of `run`
3. Created install_package for use in the systemd and sysvinit tests.
4. Removed lots of needless stderr to stdout redirects.

Closes #13075
Related to #13074
2015-09-01 14:57:47 -04:00
Nik Everett e4410482fe Packaging: Install all plugins during bats tests
Related to #12717
2015-09-01 13:43:56 -04:00
Nik Everett 577dcd7c26 Merge pull request #12903 from nik9000/cleanup_tar
Clean up the tar tests
2015-08-24 10:00:21 -04:00
David Pilato 0599f85d2d [build] simplify ant script for plugins
Now we are using short names for artifactId (see #12879) so we don't need anymore to transform long names `elasticsearch-pluginname` to short names `pluginname` in ant script when we install a plugin.
Modify also convert-plugin-name
Clean up remaining plugins with old format
And fix vagrant tests
2015-08-18 19:41:37 +02:00
Nik Everett 0b650ed203 Add tests for plugins with bin directory
Also removes all mention of shield:
```bash
$ find $BATS -type f -exec grep -Hi shield {} \;
$
```
2015-08-17 10:53:16 -07:00
Nik Everett 391ea379e2 Test: Use jvm-example for testing bin/plugin
Related to #12651
2015-08-17 10:53:16 -07:00
Nik Everett 513ac4471a Tests: Clean up the tar tests
1. Move `clean_before_test` to the first test so its more explicit.
2. Move `skip_not_tar_gz` to setup because it was run first in every test.
3. Remove calls to `run` that only check the status. Its simpler to just
execute the command. Its better because std-out will be captured and replayed
on error.
4. Switch from `su` to `sudo` because `su` was breaking `bats`'s error
reporting.
2015-08-17 10:31:08 -07:00
Nik Everett 1d54cff167 Test: Remove ES_CLEAN_BEFORE_TEST
In the bats test ES_CLEAN_BEFORE_TEST was used to clean the environment
before running the tests. Unfortunately the tests don't work unless you
specify it every time. This removes that option and always runs the clean.
2015-08-14 15:12:52 -07:00
Nik Everett f84552dc98 [Packaging] Run tests in vagrant
This creates a module in qa called vagrant that can be run if you have
vagrant and virtualbox installed and will run the packaging tests in trusty
and centos-7.0. You can ask it to run tests in other linuxes. This is the full
list:
* precise aka Ubuntu 12.04
* trusty aka Ubuntu 14.04
* vivid aka Ubuntun 15.04
* wheezy aka Debian 7, the current debian oldstable distribution
* jessie aka Debian 8, the current debina stable distribution
* centos-6
* centos-7
* fedora-22
* oel-7

There is lots of documentation on how to do this in the TESTING.asciidoc.

Closes #12611
2015-08-10 05:31:42 -04:00