Commit Graph

71 Commits

Author SHA1 Message Date
Lee Hinman 2f8e3db1e8 Add quotes to prevent shell globbing in TESTING.asciidoc 2016-08-09 09:11:45 -06:00
David Pilato 358ee7c272 Fix REST test documentation
To run the tests we have to use now `*Yaml*IT` instead of `RestIT`:

```sh
gradle :distribution:integ-test-zip:integTest  -Dtests.class=org.elasticsearch.test.rest.*Yaml*IT
```
2016-08-03 13:50:45 +02:00
javanna c63c5dc6a9 another s/maven/gradle 2016-07-28 14:39:46 +02:00
adityasinghraghav 952bc928fc Update TESTING.asciidoc (#19652) 2016-07-28 14:38:13 +02:00
Alexander Kazakov 2fc328e10a Docs: Fix typo in RestIT 2016-06-15 15:06:50 -04:00
Chris Earle b49635539d Remove support for -Des.* system properties in integration tests
This now requires that system properties passed to Gradle must be in the form of "-Dtests.es.*" instead of
"-Des.*". It then chops off "tests.es." and passes that as a "-E" property to Elasticsearch.

Also changed system properties:

- `tests.logger.level` became `tests.es.logger.level`
- `node.mode` became `tests.es.node.mode`
- `node.local` became `tests.es.node.local`
2016-05-23 19:38:21 -04:00
Jason Tedor 555de4256e Remove stale transport mode instructions from docs
This commit removes some stale instructions for setting the transport
mode via an environment variable from the testing docs.
2016-05-23 14:28:11 -04:00
Jason Tedor c257e2c51f Remove settings and system properties entanglement
Today when parsing settings during bootstrap, we add a system property
for every Elasticsearch setting. Additionally, settings can be set via
system properties. This commit simplifies this situation.
 - settings are no longer propogated to system properties
 - system properties can not be used to set settings
 - the "es." prefix on settings is no longer required (nor permitted)
 - test logging has a dedicated system property (tests.logger.level)

Relates #18198
2016-05-19 14:08:08 -04:00
Ryan Ernst d1cfe0e7cd Update docs for vagrant tests with new gradle task names 2016-04-06 16:09:05 -07:00
Britta Weber 0cf7d16495 [test] fix rename trusty -> ubuntu-1404 2016-03-30 13:58:22 +02:00
Britta Weber 6c1b415891 [test] fix doc for centos-7 test 2016-03-30 13:55:20 +02:00
Yannick Welsch f19056ec20 Fix documentation for running REST tests using Gradle 2015-12-17 16:26:10 +01:00
andrejserafim 9015d0ca73 Fix REST test command line instructions
Closes #15154
2015-12-01 12:18:44 -05:00
Nik Everett b6826bfc78 [doc] Information on JVM fork count
I spent 20 minutes reading gradle docs to figure out how to do this. No one
else should have to do that.

Also, some of the documentation was out of date.
2015-11-30 09:17:43 -05:00
Ryan Ernst d97ed9edc3 Fix testing instructions with x-plugins 2015-11-23 14:54:08 -08:00
Ryan Ernst 5a62282150 Build: Rework extra plugins support to be through sibling directories
This change removes the subdirectory support for extra-plugins, and
replaces it with an iteration of sibling directories with the prefix
"extra-plugin-".
2015-11-23 14:15:45 -08:00
Ryan Ernst b8e462b934 Build: Change project attachment into special extra-plugins dir
Currently we use the "gradle project attachment plugin" to support
building elasticsearch as part of another project. However, this plugin
has a number of issues, a large part of which is requiring consistent
use of the projectsPrefix.

This change removes projectsPrefix, and adds support for a special
extra-plugins directory in the root of elasticsearch. Any projects
checked out within this directory will be automatically added to
elasticsearch.
2015-11-22 08:44:33 -08:00
Nik Everett 8ffb63a177 Merge pull request #14718 from nik9000/gradle_deb
Get packaging working in gradle
2015-11-18 14:17:11 -05:00
Nik Everett 9b0a47d8e3 Fix rpm and deb distributions
and test them with vagrant
2015-11-18 14:16:42 -05:00
Ryan Ernst 0e8d605e2d Build: Add --debug-jvm option to run and integTest tasks
Sometimes when running elasticsearch, it is useful to attach a remote
debugger. This change adds a --debug-jvm option (the same name gradle
uses for its tests debug option), which adds java agent config for a
remote debugger. The configuration is set to hava java suspend until the
remove debugger is attached.

closes #14772
2015-11-17 16:29:01 -08:00
andrejserafim 2bd353d72d replacing run.bat and run.sh with gradle run
run.sh and run.bat were calling out to the old maven build system.
This is no longer in place, so we've created new gradle tasks to
start an elasticsearch node from the current codebase.

fixed #14423
2015-11-08 17:07:19 +00:00
Nik Everett 1dd00dddd5 [test] Gradle-ify vagrant tests
This gets the tar and tar_plugins tests working in gradle. It does so by
adding a subproject, qa/vagrant, which adds the following tasks:

Verification
------------
checkPackages - Check the packages against a representative sample of the
                linux distributions we have in our Vagrantfile
checkPackagesAllDistros - Check the packages against all the linux
                          distributions we have in our Vagrantfile

Package Verification
--------------------
checkCentos6 - Run packaging tests against centos-6
checkCentos7 - Run packaging tests against centos-7
checkDebian8 - Run packaging tests against debian-8
checkFedora22 - Run packaging tests against fedora-22
checkOel7 - Run packaging tests against oel-7
checkOpensuse13 - Run packaging tests against opensuse-13
checkSles12 - Run packaging tests against sles-12
checkUbuntu1204 - Run packaging tests against ubuntu-1204
checkUbuntu1404 - Run packaging tests against ubuntu-1404
checkUbuntu1504 - Run packaging tests against ubuntu-1504

Vagrant
-------
smokeTestCentos6 - Smoke test the centos-6 VM
smokeTestCentos7 - Smoke test the centos-7 VM
smokeTestDebian8 - Smoke test the debian-8 VM
smokeTestFedora22 - Smoke test the fedora-22 VM
smokeTestOel7 - Smoke test the oel-7 VM
smokeTestOpensuse13 - Smoke test the opensuse-13 VM
smokeTestSles12 - Smoke test the sles-12 VM
smokeTestUbuntu1204 - Smoke test the ubuntu-1204 VM
smokeTestUbuntu1404 - Smoke test the ubuntu-1404 VM
smokeTestUbuntu1504 - Smoke test the ubuntu-1504 VM
vagrantHaltCentos6 - Shutdown the vagrant VM running centos-6
vagrantHaltCentos7 - Shutdown the vagrant VM running centos-7
vagrantHaltDebian8 - Shutdown the vagrant VM running debian-8
vagrantHaltFedora22 - Shutdown the vagrant VM running fedora-22
vagrantHaltOel7 - Shutdown the vagrant VM running oel-7
vagrantHaltOpensuse13 - Shutdown the vagrant VM running opensuse-13
vagrantHaltSles12 - Shutdown the vagrant VM running sles-12
vagrantHaltUbuntu1204 - Shutdown the vagrant VM running ubuntu-1204
vagrantHaltUbuntu1404 - Shutdown the vagrant VM running ubuntu-1404
vagrantHaltUbuntu1504 - Shutdown the vagrant VM running ubuntu-1504
vagrantSmokeTest - Smoke test some representative distros from the Vagrantfile
vagrantSmokeTestAllDistros - Smoke test all distros from the Vagrantfile
vagrantUpCentos6 - Startup a vagrant VM running centos-6
vagrantUpCentos7 - Startup a vagrant VM running centos-7
vagrantUpDebian8 - Startup a vagrant VM running debian-8
vagrantUpFedora22 - Startup a vagrant VM running fedora-22
vagrantUpOel7 - Startup a vagrant VM running oel-7
vagrantUpOpensuse13 - Startup a vagrant VM running opensuse-13
vagrantUpSles12 - Startup a vagrant VM running sles-12
vagrantUpUbuntu1204 - Startup a vagrant VM running ubuntu-1204
vagrantUpUbuntu1404 - Startup a vagrant VM running ubuntu-1404
vagrantUpUbuntu1504 - Startup a vagrant VM running ubuntu-1504

It does not make the "check" task depend on "checkPackages" so running the
vagrant tests is still optional. They are slow and depend on vagrant and
virtualbox.

The Package Verification tasks are useful for testing individual distros.

The Vagrant tasks are listed in `gradle tasks` primarily for discoverability.
2015-11-05 14:28:30 -05:00
Ryan Ernst c86100f636 Switch build system to Gradle
See #13930
2015-10-29 11:40:19 -07:00
Robert Muir 0d0a4b3ff7 Upgrade to randomizedtesting 2.2.0
Closes #14342
2015-10-28 15:28:30 -04:00
Luca Cavanna ae73979e4b [DOCS] clarify command to run REST tests only
Rest tests are now part of the verify goal, thus if we only want to execute those we need to skip unit tests, otherwise we'll get an error saying that the test phase completed without running any tests.
2015-10-20 15:50:56 +02:00
Britta Weber de73910a13 add -DtestScript option 2015-09-25 19:04:28 +02:00
Alexander Reelsen 2b46a72a6c BATS testing: Add SLES-12 to list of tested virtual machines
This adds SuSe Linux Enterprise Server 12 to the list of tested VMs.
SLES 12 is using systemd, so that the current RPM works
out of the box.

SLES12 however is already quite old and does not ship with java8, so this
required adding an opensuse repo.
2015-09-22 15:02:22 +02:00
André Carvalho 4d2fcb7a3c Removes wheezy from list of scripts testing docs 2015-09-21 16:02:50 -03:00
Robert Muir 517f00b048 doc how to get code coverage for unit,integ,combined 2015-09-01 20:57:48 -04:00
Nik Everett fb561ce228 [docs] Lock vagrant to virtualbox 2015-08-31 10:52:09 -04:00
David Pilato b93a75f309 [doc] fix asciidoc format 2015-08-17 17:45:18 +02: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 999001746a Move vagrant activation to a parameter
Closes #12611
2015-08-12 07:40:09 -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
Robert Muir 368c41666c WE CANT EVEN GET BIN/ELASTICSEARCH WORKING!!!! 2015-08-09 08:09:44 -04:00
David Pilato 2b9ef26006 [doc] testing from an IDE 2015-08-09 12:15:47 +02:00
Robert Muir 0e0fef81b2 Fix coverage analysis. Two versions of jacoco were being used and creating jar hell 2015-08-03 23:08:18 -04:00
Ryan Ernst 6d0c106178 Fix testing docs to not mention @Slow or @Integration 2015-08-03 16:32:35 -07:00
Robert Muir 379ffdb8ee Add integration test phase for elasticsearch core/ 2015-08-03 09:43:11 -04:00
Dave Parfitt c755033fee update TESTING doc to use run.sh script 2015-07-29 14:41:23 -04:00
Dave Parfitt 70dfa26678 [DOCS] update TESTING doc running from source
cc @dakrone

see also elasticsearch@48bc49c093516def7cad468d1d97d490d4f609e9
2015-07-27 13:35:12 -04:00
Alexander Reelsen 9628d2632f Build: Split packages into submodules
This change creates a proper `distribution` modules in which we have today packaging for
all of our four current packages:

* zip
* tar.gz
* rpm
* deb

Licenes have moved into the distribution project as well. So have the config/ and the bin/ directory
from the core/ project.

The RPM package is now built, if rpmbuild exists.

The bats tests have been moved as well.

Also the zip distribution now executes the REST integration tests.
2015-07-27 17:50:54 +02:00
Britta Weber 272babd9dc [TEST] add comment bout security manager to bwc test description 2015-05-12 10:26:42 +02:00
Tanguy Leroux 867955188e Standardization of packages structure and install
The existing DEB/RPM packages have a lot of differences: they don't execute the same actions when installing or removing the package. They also don't declare exactly the same environment variables at the same place. At the end of the day the global behavior and configuration is *almost* the same but it's very difficult to maintain the scripts.

This commits unifies the package behavior:
- DEB/RPM use the same package scripts (pre installation, post installation etc) in order to execute exactly the same actions
- Use of a unique environment vars file that declares everything needed by scripts (the goal is to delete vars declaration in init.d and systemd scripts, this will be done in another PR)
- Variables like directory paths are centralized and replaced according to the target platform (using #10330)
- Move /etc/rc.d/init.d to standard /etc/init.d (RPM only)
- Add PID_DIR env var
- Always set ES_USER, ES_GROUP,MAX_MAP_COUNT and MAX_OPEN_FILES in env vars file
- Create log, data, work and plugins directories with DEB/RPM packaging system
- Change to elastic.co domain in copyright and control files
- Add Bats files to automate testing of DEB and RPM packages
- Update TESTING.asciidoc

More info on Bats here:  https://github.com/sstephenson/bats
2015-04-20 14:58:19 +02:00
Simon Willnauer 551d16f685 [DOCS] Fix REST test execution line in testing documentation 2015-04-19 13:56:25 +02:00
Lee Hinman 1cb169afb4 Add ability to launch bootstrapped ES using maven
This adds the exec-maven-plugin that allows a developer to run:

```
mvn exec:exec
```

To launch the `Bootstrap` process similar to the way that a Java IDE
would. All the logs go to logs/elasticsearch.log (or wherever
configured)
2015-03-30 11:07:21 -06:00
Lee Hinman 9bf4afd88e [TEST] Add `-Pdev` to the TESTING.asciidoc guide 2015-03-15 18:48:17 -06:00
Britta Weber f9b7fe136a [TEST] add description of -Dvalidate.skip parameter 2014-11-04 16:20:01 +01:00
Britta Weber 2f9eaae863 Testing doc: describe -Dtests.heap.size and -Dtests.jvm.argline 2014-08-21 15:59:31 +02:00
Simon Willnauer 9ddfaf3aaf [TEST] Expose `tests.filter` for elasticsearch tests.
`-Dtests.filter` allows to pass filter expressions to the elasticsearch
tests. This allows to filter test annotaged with TestGroup annotations
like @Slow, @Nightly, @Backwards, @Integration with a boolean expresssion like:

 * to run only backwards tests run:
     `mvn -Dtests.bwc.version=X.Y.Z -Dtests.filter="@backwards"`
 * to run all integration tests but skip slow tests run:
     `mvn -Dtests.filter="@integration and not @slow"
 * to take defaults into account ie run all test as well as backwards:
     `mvn -Dtests.filter="default and @backwards"

This feature is a more powerful alternative to flags like
`-Dtests.nighly=true|false` etc.

Closes #6703
2014-07-03 11:40:49 +02:00