526 Commits

Author SHA1 Message Date
Simon Willnauer
f9c19dba56 Wait for green in mlt tests 2014-02-07 19:20:36 +01:00
Clinton Gormley
cd679b9e57 [TESTS] Looks like Java character classes require explicit \s 2014-02-07 18:28:00 +01:00
Luca Cavanna
8ef82f9bdf [TEST] fixed cat/allocation REST tests 2014-02-07 18:22:07 +01:00
Clinton Gormley
8d98dbead0 [TESTS] Make cat.allocation tests handle different disk sizes 2014-02-07 17:54:38 +01:00
Clinton Gormley
027a418930 [TESTS] Fixed cat.allocation tests to work with one node cluster 2014-02-07 17:44:41 +01:00
Clinton Gormley
3bd0f6cb63 [TEST] Added cat.allocation and cat.aliases tests 2014-02-07 17:36:01 +01:00
Luca Cavanna
c82b231ad8 [TEST] disabled refresh for get_source realtime test 2014-02-07 13:52:49 +01:00
Luca Cavanna
05cc67c872 [TEST] slightly sped up warmer tests by providing warmers during index creation 2014-02-07 13:52:49 +01:00
Luca Cavanna
acaa5c7519 [TEST] removed leftover delete alias test in delete mapping 2014-02-07 13:52:49 +01:00
Luca Cavanna
63f9281bbf [TEST] added missing put warmer body 2014-02-03 15:30:58 +01:00
Luca Cavanna
c72e1de1c4 [TEST] fixed typo s/mising/missing 2014-02-03 15:30:58 +01:00
Luca Cavanna
88771fdf99 [TEST] Added ability to test apis that don't return json
The last response body gets now always stashed in the REST tests and can be retrieved via `$body`. This implies that not only expected values can be retrieved from the stashed values, but actual values as well.

Added support for regular expressions to `match` assertion, using `Pattern.COMMENTS` flag for better readability through new custom hamcrest matcher (adopted in do section as well). Functionality added through new feature called `regex` that needs to be mentioned in the skip sections whenever needed till all the runners support it.

Added also example tests for cat count api
2014-02-03 11:26:38 +01:00
Luca Cavanna
d68d8fbf11 [TEST] clarified skip features usage 2014-01-31 18:03:24 +01:00
Luca Cavanna
33d5a722b3 [TEST] Added ability to skip REST test suite/sections based on their required features
As we have different runners for the REST tests we need a mechanism that allows us to add features to any of them without breaking all others builds.
The idea is to name a feature and temporarily use skip sections that mention the required new features, so that runners that don't support it will skip the test.

Added support for `features` field in skip section.
Added `Features` class that contains a static list of the features supported by the runner. If a feature mentioned in a skip section is not listed here, the test will be skipped.
2014-01-31 16:47:40 +01:00
Clinton Gormley
c900ec2152 [TEST] Fixed whitespace in cluster.state/20_filtering.yaml 2014-01-29 13:33:29 +01:00
Alexander Reelsen
5e58f4066e REST API: Consistent get field mapping response
If a get field mapping request is issued, and all but the field can be
found, the response should return an empty JSON object instead of a 404.

Closes #4738
2014-01-28 08:12:53 +01:00
Martijn van Groningen
f38296da61 Percolator response now always returns the matches key.
Closes #4881
2014-01-27 16:37:09 +01:00
Luca Cavanna
da1e3ed8fc [TEST] Added REST tests for create index api 2014-01-27 14:50:04 +01:00
Alexander Reelsen
24abb6cf3f Cluster state toXContent serialization only returns needed data
In order to make sure, that only the requested data is returned to the client,
a couple of fixes have been applied in the ClusterState.toXContent() method.
Also some tests were added to the yaml test suite

Closes #4885
2014-01-27 12:04:57 +01:00
David Pilato
09575eb95f Revert mget yaml test changes
Relative to #4892
2014-01-27 11:28:32 +01:00
David Pilato
fdbdb705b9 Revert mget yaml test changes
Relative to #4892
2014-01-27 11:25:39 +01:00
David Pilato
4c50770a89 mget REST API should support source parameter
As stated in documentation, we should support `?source=` parameter in mget REST operations.

This is how to reproduce it:

```sh
curl -XDELETE "http://localhost:9200/test"

curl -XPOST "http://localhost:9200/test/type/1?refresh" -d'{
    "foo": "bar"
}'

curl -XPOST "http://localhost:9200/test/type/_mget" -d'{
    "ids": ["1"]
}'

curl -XGET "http://localhost:9200/test/type/_mget?source=%7B%22ids%22%3A%20%5B%221%22%5D%7D"
```

Closes #4892.
2014-01-27 11:05:50 +01:00
Clinton Gormley
d70e6c4730 [SPEC] Updated docs URLs to point to master 2014-01-22 14:40:31 +01:00
Clinton Gormley
882fbb72fd [SPEC] Specify bulk format for body in bulk, msearch, mpercolate 2014-01-21 16:31:51 +01:00
Clinton Gormley
5800209a1e [TEST] Added newline at end of percolate tests 2014-01-21 16:31:50 +01:00
Clinton Gormley
acdf2a5825 [SPEC] Renamed termvectors.* to termvector and mtermvectors
and fixed the YAML syntax errors
2014-01-21 16:31:50 +01:00
Britta Weber
cae5eb479a [SPEC,TEST,FIX] add spec and tests for termvector api and fix inconsistencies
- index and type were not read from the uri with the _mtermvectors api
- ids were not read from the uri parameters with the _mtermvectors api
2014-01-21 10:03:25 +01:00
Igor Motov
749e4d7944 [SPEC] Fix cardinality of the repository parameter in get snapshot action 2014-01-20 12:56:32 -05:00
Martijn van Groningen
efebb8d515 [TESTS] Added percolator rest tests. 2014-01-20 18:18:27 +01:00
Martijn van Groningen
9bc3d996ff [SPECS] Updated percolator specs. 2014-01-20 18:18:27 +01:00
Spencer Alger
8c7bbbcc8f Added setup task that clears the test template before running exists_* tests 2014-01-20 09:52:25 -07:00
Clinton Gormley
7129b9e6e6 [TEST] Added missing \n at end of YAML files, quoted * and fixed indentation 2014-01-20 13:25:16 +01:00
Clinton Gormley
a313328777 [TEST] Added missing newline at end of YAML test file 2014-01-20 13:16:04 +01:00
Luca Cavanna
55a247e257 master_timeout parameter is now taken into account when calling cluster pending tasks api through the REST layer
Closes #4806
2014-01-20 12:53:55 +01:00
Luca Cavanna
3a558972b2 Added base Request class for read operations that usually happen on the master but can be executed locally.
Added base TransportAction class for master read operations that execute locally or not depending on the request class (local flag).

Added support for local flag where missing, in a backwards compatible manner:
     - IndicesExistsRequest
     - GetAliasesRequest (get alias api, aliases exist api)
     - TypesExistsRequest
     - GetIndexTemplatesRequest (get template, template exists)
     - GetSettingsRequest
     - GetRepositoriesRequest
     - PendingClusterTasks

 Added parsing of the local flag where missing in Rest*Action.

 Updated SPEC adding local flag param where missing and added REST tests that contain use of the local flag where it was just added.

Closes #3345
2014-01-20 12:35:48 +01:00
Clinton Gormley
67ec840d00 [SPEC] Various API fixes
Including:
* change some string params to list
* make some params or bodies required
* removed incorrect URLs
* removed incorrect params
* Fixed name of pending_tasks
2014-01-20 11:14:11 +01:00
Clinton Gormley
20b37416e3 [SPEC] Removed create.json
Create is a special API that is most simply and safely
implemented by calling the index() api with op_type
set to true.
2014-01-20 11:14:11 +01:00
Luca Cavanna
619c46a2a3 [SPEC] Removed empty paths from close and delete index apis
Although the empty paths are still registered in the java RestActions, that is only to return a meaningful error in case the index is not provided.
Index/indices are now mandatory.
2014-01-18 10:40:46 +01:00
Honza Král
fe60cca038 [SPEC] path without {index} is not allowed for indices.open api 2014-01-17 22:54:07 +01:00
Luca Cavanna
de893d80de [SPEC] Removed _source endpoint from get api spec, as the get_source is a different api already
Also removed custom code that was required in the REST tests due to this.
2014-01-17 18:05:07 +01:00
Honza Král
13e6f1933b [SPEC] removing deprecated include/exclude for get_source
_source_include/_source_exclude should be used instead
2014-01-17 15:38:25 +01:00
Luca Cavanna
1fba68a634 [SPEC] Added missing body object in snapshot apis 2014-01-17 15:34:42 +01:00
Clinton Gormley
53359c0d3d [SPEC] Created snapshot.* and nodes.* namespaces
Moved node_info, node_stats, shutdown and hot_threads into nodes.*
Moved snapshot and repository APIs into snapshot.*
2014-01-17 11:58:44 +01:00
Clinton Gormley
612044b386 [SPEC] Added missing cat endpoints. count and recovery
And added missing qs params to health and indices.
2014-01-16 22:09:48 +01:00
Luca Cavanna
06057c6c39 [TEST] Added check: test section names must be unique in the same REST test suite
Fixed also three duplicates found
2014-01-16 21:09:55 +01:00
Clinton Gormley
258c49ea23 [SPEC] Fixed bad name in ping.json 2014-01-16 19:54:25 +01:00
Clinton Gormley
1ca11b11e4 [SPEC] Fixed cluster.get_repository spec
Badly named endpoint
2014-01-16 19:43:58 +01:00
Clinton Gormley
fa6e8abf48 [SPEC] Fixed cat.* spec files - were missing the endpoints 2014-01-16 19:43:58 +01:00
Clinton Gormley
c5942a4ff8 [TEST] Fixed mget test which used deprecated refresh flag 2014-01-16 19:43:58 +01:00
Clinton Gormley
64f0361f5e [SPEC] Fixed file name, missing .json 2014-01-16 17:12:39 +01:00