29 Commits

Author SHA1 Message Date
Boaz Leskes
051beb51a3 Version types EXTERNAL & EXTERNAL_GTE test for version equality in read operation & disallow them in the Update API
Separate version check logic for reads and writes for all version types, which allows different behavior in these cases.
Change `VersionType.EXTERNAL` & `VersionType.EXTERNAL_GTE` to behave the same as `VersionType.INTERNAL` for read operations.
The previous behavior was fit for writes but is useless in reads.

This commit also makes the usage of `EXTERNAL` & `EXTERNAL_GTE` in the update api raise a validation error as it make cause data to
be lost.

Closes #5663 , Closes #5661, Closes #5929
2014-04-25 23:06:12 +02:00
javanna
1ec4f8f04b [TEST] Replaced RestTestSuiteRunner with parametrized test that uses RandomizedRunner directly
ElasticsearchRestTests extends now ElasticsearchIntegrationTest and makes use of our ordinary test infrastructure, in particular all randomized aspects now come for free instead of having to maintain a separate (custom) tests runner

We previously parsed only the tests that needed to be run given the version of the cluster the tests are running against. This doesn't happen anymore as it didn't buy much and it would be harder to support as the tests get now parsed before the test cluster gets started. Thus all the tests are now parsed regardless of their skip sections, afterwards the ones that don't need to be run will be skipped through assume directives.

Fixed REST tests that rely on a specific number of shards as this change introduces also random number of shards and replicas (through randomIndexTemplate)

Closes #5654
2014-04-07 17:08:05 +02:00
Luca Cavanna
63eccce8f9 [TEST] moved routing REST tests to 0 replicas
REST tests get run against either 1 node or multiple nodes. Wait for yellow with replicas>0 is not enough when running against multiple nodes as replicas shard might get initialized  during testing, which can cause timing issues.
2014-02-10 12:32:34 +01:00
Luca Cavanna
a3ad592198 [TEST] Fixed get_source/60_realtime_refresh REST test to work against multiple nodes
Replaced also wait for yellow with wait for green when using no replicas.

get_source/60_realtime_refresh tests per shard refresh using refresh:true and realtime:true in get api. We might run into troubles though if we have a replica that gets initialized after a doc was indexed without a refresh, as that doc will be found when searching against that specific replica shard (as a refresh happens automatically before a replica gets exposed as started).
2014-02-10 12:32:34 +01:00
Britta Weber
216c814a7f remove default _all for type and index if these are missing in REST tests
If a type or path is missing in the REST test yaml file, it is
automatically replaced with _all. This makes it hard to test changes
in the api, for example adding the possibility to leave the index
blank in addition to _all and * in the uri.

closes #4657
2014-01-09 10:17:42 +01:00
Lee Hinman
2cb40fcb17 Rename "exists" to "found" in TermVector and Get responses
- Adds the "created" field to the index action response
- Reverses Delete class' notFound to Found to avoid double negative
2014-01-07 09:47:07 -07:00
Honza Král
623e4a0fc8 [TEST] remove old tests from yaml test suite 2014-01-07 16:19:06 +01:00
Honza Král
4aeaa3bac4 [TEST] Fix yaml tests after #4542 2014-01-07 16:06:25 +01:00
Honza Král
076a24af14 [TEST] split tests with parent to pre/post 1.0 in the yaml test suite
See #4506 for details
2014-01-02 20:04:24 +01:00
Martijn van Groningen
a7bb28c0e7 Made single shards APIs fail if routing is configured to be required in the mapping.
This change make single shard requests fail when no routing is specified and routing has been configured to be required in the mapping. Thi

 Closes #4506
2014-01-02 10:47:53 +01:00
Clinton Gormley
c579164a88 [TEST] Fixed bad indentation on realtime_refresh tests 2013-11-05 13:28:47 +01:00
Karel Minarik
e051c8a663 [TEST] Create the index with number_of_replicas: 0 for "Realtime Refresh" tests 2013-11-05 11:24:31 +01:00
Boaz Leskes
87df522786 updated source filtering tests and spec
Fixed id tests to be strings.
Changed the _source_* param of get_source as they have changed in core.
2013-10-08 18:18:20 +02:00
Spencer Alger
13719a4c2e removed some spaces that cause my yaml parser to choke 2013-09-18 08:54:17 -07:00
Karel Minarik
397235e2f2 Changed the ignore_missing client parameter to ignore: 404
This should make easier any potential expansion such as:

    client.update('index', 'type', 41, {...}, ignore: 409

Also restructured and renamed the test suite a bit as part of the commit.

---

This reverts commit 0b142cc8812d8d090e48ea0ad89c007767870b91, "Removed client-specific `ignore_missing` parameter".
2013-09-09 23:36:45 +02:00
Karel Minarik
cb4b04e49f Added tests for default document type in get and get_source APIs 2013-09-09 23:36:45 +02:00
Karel Minarik
bd9befbc80 Revert "Changed the missing type to _all in "Get" test"
This reverts commit c7b376a4222d68788c59ffefbaaeae33d70536b8.
2013-09-09 23:36:45 +02:00
Karel Minarik
46059673ef Changed the missing type to _all in "Get" test 2013-09-09 23:36:44 +02:00
Karel Minarik
081b3e3982 Removed client-specific ignore_missing parameter
This parameter can introduce confusion, since people might think this is something
working on Elasticsearch level, eg. passing it to `curl`
2013-09-09 23:36:43 +02:00
Boaz Leskes
dbc0823a77 Added version skip commands for source filtering tests 2013-07-30 14:00:23 +02:00
Boaz Leskes
495667facb Added source filtering to tests 2013-07-30 13:30:45 +02:00
Honza Kral
cde1260e81 Unicode in parent/routing 2013-07-14 15:44:57 +02:00
Honza Kral
3166c17186 Sprinkle some unicode in GET tests 2013-07-14 15:37:55 +02:00
Honza Kral
67fd978494 text ids 2013-07-11 02:32:35 +02:00
Clinton Gormley
6aa5b10f5d Added realtime/refresh tests to get 2013-07-01 16:02:38 +02:00
Clinton Gormley
0bc9ffbb23 Added test with missing type to get 2013-07-01 16:00:58 +02:00
Clinton Gormley
df94f08dab Renamed "ok" and "not_ok" to "is_true" and "is_false"
and tidied up the layout to make it easier to read
2013-07-01 15:58:23 +02:00
Clinton Gormley
051284c346 Added ignore_missing test to get/10_basic 2013-06-28 17:22:32 +02:00
Clinton Gormley
04e6c62e1a Added tests for get 2013-06-27 11:34:44 +02:00