Commit Graph

102 Commits

Author SHA1 Message Date
Jason Tedor 03ce3dd4a4 Enable skipping fetching latest for BWC builds (#29497)
The BWC builds always fetch the latest from the elastic/elasticsearch
repository for the BWC branches. Yet, there are use-cases for using the
local checkout without fetching the latest. This commit enables these
use-cases by adding a tests.bwc.git.fetch.latest property to skip the
fetches.
2018-04-13 09:31:06 -04:00
Ryan Ernst a75a7d22b2
Build: Use branch specific refspec sysprop for bwc builds (#29299)
This commit changes the sysprop for overriding the branch bwc builds use
to be branch specific. There are 3 different bwc branches built, but all
of them currently read the exact same sysprop. For example, with this change
and current branches, you can now specify eg `-Dtests.bwc.refspec.6.x=my_6x`
and it will build only next-minor-snapshot with that branch, while
next-bugfix-snapshot will continue to use 5.6.
2018-03-29 11:59:52 -07:00
Jason Tedor 4417580d05
Remove leftover tests.rest.spec property from docs (#29279)
We previously had a property to specify the location of the REST test
spec files but this was removed in a previous refactoring yet left
behind in the docs. This commit removes the last remaining vestige of
this parameter.
2018-03-28 08:22:06 -04:00
Bart van Oort 67a6a76aad Docs: Update generating test coverage reports (#29255)
Old docs said to use maven. That doesn't work. We can't generate the
reports right now.
2018-03-27 17:29:19 -04:00
Andy Bristol 7bf9091942
[test] packaging: gradle tasks for groovy tests (#29046)
The vagrant test plugin adds tasks for the groovy packaging tests,
which run after the bats packaging test tasks.Rename the 'bats'
configuration to 'packaging' and remove the option to inherit
archives from this configuration.
2018-03-26 13:43:09 -07:00
Paul Sanwald 9f7cd14f15
Update Gradle Testing Docs (#28970)
Attempting to run the REST tests, I noticed the testing instructions
  in the `TESTING.asciidoc` were outdated, so I fixed the paths.
  Steps I took to test:

  * Ran `./gradlew :distribution:packages:rpm:assemble` and make sure
  RPM is created in `./distribution/packages/rpm/build/distributions/`

  * Ran testing commands and verified the REST tests ran.
2018-03-09 11:54:59 -08:00
Ivan Brusic 5f6ce1ae75 Highlight the "hidden" REST API test suite (#28381) 2018-02-09 15:05:19 -08:00
Jason Tedor 79a2c25387
Update testing docs to reflect Gradle wrapper
This commit updates the testing docs to reflect the usage of the Gradle
wrapper.

Relates #28107
2018-01-05 17:19:34 -05:00
Dimitrios Liappis d3e3bc8656
Tests: Add Fedora-27 to packaging tests
Replace Fedora-25 with Fedora-27 and fix old references in
`TESTING.asciidoc`.

Relates #27434
2017-11-20 16:59:00 +02:00
Jason Tedor bef3180146 Enable BWC testing against other remotes
This commit enables BWC testing against remotes on GitHub other than
elastic/elasticsearch.git.

Relates #26918
2017-10-07 13:40:18 -04:00
Dimitrios Liappis 5079afd0bb Tests: Add Fedora-26 to packaging tests
Add Fedora-26 to packaging tests. Don't retire Fedora-25 yet, as it
will be EOL, one month after Fedora-27 is out.

Relates #26726
2017-10-03 12:01:20 +03:00
Albert Zaharovits c1452ff9ea [DOC] macOS localhost resolve for integ tests 2017-08-23 12:02:57 +03:00
Boaz Leskes f79c2cb8c0 Allow BWC Testing against a specific branch (#25510)
Some times we need a fix / change to have two parts in two different branches (corresponding to two different ES releases). In order to be able to test these cases you need to run the BWC tests against a local branch rather than then using a branch from `github.com/elastic/elasticsearch`.

This commit adds a system property called `tests.bwc.refspec` that allows you to do it. Note that I've chosen to go with the simplest code change for now, at the expense of some user friendliness.
2017-07-07 11:18:03 +02:00
Dimitrios Liappis 39d42292dd Tests: Add Debian 9 (Stretch) to the packaging tests
Debian 9 aka Stretch is the current stable[1].

Add Debian-9 to the packaging tests.

[1] https://wiki.debian.org/DebianStretch

Relates #25494
2017-07-03 11:02:17 +03:00
Dimitrios Liappis 8f8fc74b2e Tests: Switch to openSUSE 42 (Leap) for packaging tests
openSUSE-13 has reached [EOL](https://en.opensuse.org/Lifetime).

Replace openSUSE-13 with openSUSE-42 (Leap) for packaging tests and
update docs.

Relates #25001
2017-06-01 15:40:47 +03:00
Ryan Ernst 0353bd1fb6 Test: Convert rolling upgrade test to have task per wire compat version (#24758)
This commit changes the rolling upgrade test to create a set of rest
test tasks per wire compat version. The most recent wire compat version
is always tested with the `integTest` task, and all versions can be
tested with `bwcTest`.
2017-05-18 01:14:24 -07:00
Nik Everett 4b80e1a5ca Docs: fix list of testing images
Fedora-24 is gone. Long live Fedora-25.
2017-05-04 10:49:49 -04:00
Dimitrios Liappis ee6deb34d0 Tests: Switch to fedora-25 in test plugin
Use fedora-25 Vagrant box in VagrantTestPlugin, which was missing from
9a3ab3e800 causing packaging test
failures.

Additionally update TESTING.asciidoc
2017-05-04 14:29:35 +03:00
Tanguy Leroux e81bbc288a Remove Ubuntu 12.04 (#24161)
Ubuntu 12.04 will be EOL on April 28, 2017.
2017-04-19 09:39:42 +02:00
Nik Everett 9653551072 Add package test to catch leaking default.data.path setting (#24029)
Adds a packaging test that would have detected #23981. The test configures path.data and validates that nothing ends up in default.path.data.
2017-04-17 16:36:32 -04:00
David Pilato 4019cbb222 Update doc after review 2017-01-16 10:26:12 +01:00
David Pilato 812f6e30f5 Add documentation on remote debugging
For a node which is launched outside the context of Gradle.
2017-01-13 14:57:40 +01:00
David Pilato 370ea01149 gradle run --debug-jvm is explained twice
We are already explaining how to debug remotely in `Debugging from an IDE` section.
We can remove one.
2017-01-13 14:42:27 +01:00
Tanguy Leroux dc81afd4f8 [TESTS] Create vagrant up task for all boxes (#22496)
Currently, such tasks are only created for default boxes (centos-7, ubuntu-1404) and not all boxes and this can be misleading for developers who want to debug testing scripts on non-default boxes.
2017-01-10 09:45:33 +01:00
Ryan Ernst f0c0f571bf Build: Remove hardcoded reference to x-plugins in build (#21773)
* Build: Remove hardcoded reference to x-plugins in build

The gradle build currenlty allows extra plugins to be hooked into the
elasticsearch build by placing under an x-plugins directory as a sibling
of the elasticsearch checkout. This change converts this directory to
one called elasticsearch-extra. The subdirectories of
elasticsearch-extra become first level projects in gradle (while before
they would have been subprojects of `:x-plugins`. Additionally, this
allows major version checkouts to be associated with extra plugins. For
example, you could have elasticsearch checked out as
`elasticsearch-5.x`, and a sibling `elasticsearch-5.x-extra` directory.
2016-12-14 15:02:07 -08:00
Tanguy Leroux 9cade1cc18 Add Vagrant Gradle plugin
This commit changes the current :elactisearch:qa:vagrant build file and transforms it into a Gradle plugin in order to reuse it in other projects.

Most of the code from the build.gradle file has been moved into the VagrantTestPlugin class. To avoid duplicated VMs when running vagrant tests, the Gradle plugin sets the following environment variables before running vagrant commands:
VAGRANT_CWD: absolute path to the folder that contains the Vagrantfile
VAGRANT_PROJECT_DIR: absolute path to the Gradle project that use the VagrantTestPlugin

The VAGRANT_PROJECT_DIR is used to share project folders and files with the vagrant VM. These folders and files are exported when running the task `gradle vagrantSetUp` which:
- collects all project archives dependencies and copies them into `${project.buildDir}/bats/archives`
- copy all project bats testing files from 'src/test/resources/packaging/tests' into `${project.buildDir}/bats/tests`
- copy all project bats utils files from 'src/test/resources/packaging/utils' into `${project.buildDir}/bats/utils`

It is also possible to inherit and grab the archives/tests/utils files from project dependencies using the plugin configuration:

apply plugin: 'elasticsearch.vagrant'
esvagrant {
    inheritTestUtils true|false
    inheritTestArchives true|false
    inheritTests true|false
}
dependencies {
    // Inherit Bats test utils from :qa:vagrant project
    bats project(path: ':qa:vagrant', configuration: 'bats')
}

The folders `${project.buildDir}/bats/archives`, `${project.buildDir}/bats/tests` and `${project.buildDir}/bats/utils` are then exported to the vagrant VMs and mapped to the BATS_ARCHIVES, BATS_TESTS and BATS_UTILS environnement variables.

The following Gradle tasks have also be renamed:

* gradle vagrantSetUp
This task copies all the necessary files to the project build directory (was `prepareTestRoot`)

* gradle vagrantSmokeTest
This task starts the VMs and echoes a "Hello world" within each VM (was: `smokeTest`)
2016-11-14 10:33:05 +01:00
Clinton Gormley c970aedd44 Add remote debugger instructions to TESTING.asciidoc 2016-11-05 14:24:57 +01:00
Dimitrios Liappis b0bb72ccd7 Deprecate EOL'ed Ubuntu 15.04 from Vagrantfile
* Deprecate EOL'ed Ubuntu 15.04 from Vagrantfile

Relates pr #20921
2016-10-17 17:27:01 +03:00
Simon Willnauer 194a6b1df0 Remove LocalTransport in favor of MockTcpTransport (#20695)
This change proposes the removal of all non-tcp transport implementations. The
mock transport can be used by default to run tests instead of local transport that has
roughly the same performance compared to TCP or at least not noticeably slower.

This is a master only change, deprecation notice in 5.x will be committed as a
separate change.
2016-10-07 11:27:47 +02:00
Tanguy Leroux 6090c51fc5 Add quiet option to disable console logging (#20422)
This commit adds a -q/--quiet option to Elasticsearch so that it does not log anything in the console and closes stdout & stderr streams. This is useful for SystemD to avoid duplicate logs in both journalctl and /var/log/elasticsearch/elasticsearch.log while still allows the JVM to print error messages in stdout/stderr if needed.

closes #17220
2016-09-13 14:08:24 +02:00
Tanguy Leroux 567093cf78 Add Ubuntu-16.04 to Vagrant VMs (#20425) 2016-09-13 09:26:56 +02:00
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