diff --git a/rest-api-spec/test/README.asciidoc b/rest-api-spec/test/README.asciidoc index 68599fe2dcc..e70b25488c8 100644 --- a/rest-api-spec/test/README.asciidoc +++ b/rest-api-spec/test/README.asciidoc @@ -101,19 +101,19 @@ testing indexing a document without a specified ID: The stash should be reset at the beginning of each test file. -=== `ok` +=== `is_true` The specified key exists and has a true value (ie not `0`, `false`, `undefined`, `null` or the empty string), eg: - - ok: fields._parent # the _parent key exists in the fields hash and is "true" + - is_true: fields._parent # the _parent key exists in the fields hash and is "true" -=== `not_ok` +=== `is_false` The specified key doesn't exist or has a false value (ie `0`, `false`, `undefined`, `null` or the empty string), eg: - - not_ok: fields._source # the _source key doesn't exist in the fields hash + - is_false: fields._source # the _source key doesn't exist in the fields hash === `match` diff --git a/rest-api-spec/test/create/10_with_id.yaml b/rest-api-spec/test/create/10_with_id.yaml index 52fffb20743..c33d6a5affa 100644 --- a/rest-api-spec/test/create/10_with_id.yaml +++ b/rest-api-spec/test/create/10_with_id.yaml @@ -6,7 +6,8 @@ type: test id: 1 body: { foo: bar } - - ok: ok + + - is_true: ok - match: { _index: test_1 } - match: { _type: test } - match: { _id: 1} @@ -17,6 +18,7 @@ index: test_1 type: test id: 1 + - match: { _index: test_1 } - match: { _type: test } - match: { _id: 1} diff --git a/rest-api-spec/test/create/15_without_id.yaml b/rest-api-spec/test/create/15_without_id.yaml index 2a7b425e666..12731cb8160 100644 --- a/rest-api-spec/test/create/15_without_id.yaml +++ b/rest-api-spec/test/create/15_without_id.yaml @@ -5,8 +5,9 @@ index: test_1 type: test body: { foo: bar } - - ok: ok - - ok: _id + + - is_true: ok + - is_true: _id - match: { _index: test_1 } - match: { _type: test } - match: { _version: 1 } @@ -17,6 +18,7 @@ index: test_1 type: test id: '$id' + - match: { _index: test_1 } - match: { _type: test } - match: { _id: $id } diff --git a/rest-api-spec/test/create/30_internal_version.yaml b/rest-api-spec/test/create/30_internal_version.yaml index d64deaaa1bd..fcdb2332a46 100644 --- a/rest-api-spec/test/create/30_internal_version.yaml +++ b/rest-api-spec/test/create/30_internal_version.yaml @@ -1,11 +1,13 @@ --- "Internal version": + - do: create: index: test_1 type: test id: 1 body: { foo: bar } + - match: { _version: 1} - do: diff --git a/rest-api-spec/test/create/35_external_version.yaml b/rest-api-spec/test/create/35_external_version.yaml index a18dc857c40..8ee11b0fa02 100644 --- a/rest-api-spec/test/create/35_external_version.yaml +++ b/rest-api-spec/test/create/35_external_version.yaml @@ -1,5 +1,6 @@ --- "External version": + - do: create: index: test_1 @@ -8,7 +9,9 @@ body: { foo: bar } version_type: external version: 5 + - match: { _version: 5} + - do: catch: conflict create: @@ -18,6 +21,7 @@ body: { foo: bar } version_type: external version: 5 + - do: catch: conflict create: diff --git a/rest-api-spec/test/create/40_routing.yaml b/rest-api-spec/test/create/40_routing.yaml index a0ac30b9279..c98e696800d 100644 --- a/rest-api-spec/test/create/40_routing.yaml +++ b/rest-api-spec/test/create/40_routing.yaml @@ -1,5 +1,6 @@ --- "Routing": + - do: create: index: test_1 @@ -10,6 +11,7 @@ - do: cluster.health: wait_for_status: yellow + - do: get: index: test_1 @@ -17,6 +19,7 @@ id: 1 routing: 5 fields: [_routing] + - match: { _id: 1} - match: { fields._routing: 5} diff --git a/rest-api-spec/test/create/50_parent.yaml b/rest-api-spec/test/create/50_parent.yaml index 6a423073e9b..cef907a50d1 100644 --- a/rest-api-spec/test/create/50_parent.yaml +++ b/rest-api-spec/test/create/50_parent.yaml @@ -1,5 +1,6 @@ --- "Parent": + - do: indices.create: index: test_1 @@ -26,6 +27,7 @@ id: 1 parent: 5 fields: [_parent, _routing] + - match: { _id: 1} - match: { fields._parent: 5} - match: { fields._routing: 5} diff --git a/rest-api-spec/test/create/55_parent_with_routing.yaml b/rest-api-spec/test/create/55_parent_with_routing.yaml index cb31f80985c..47a377a673b 100644 --- a/rest-api-spec/test/create/55_parent_with_routing.yaml +++ b/rest-api-spec/test/create/55_parent_with_routing.yaml @@ -1,5 +1,6 @@ --- "Parent with routing": + - do: indices.create: index: test_1 @@ -28,6 +29,7 @@ parent: 5 routing: 4 fields: [_parent, _routing] + - match: { _id: 1} - match: { fields._parent: 5} - match: { fields._routing: 4} diff --git a/rest-api-spec/test/create/60_refresh.yaml b/rest-api-spec/test/create/60_refresh.yaml index 6efe95973ef..546a9382665 100644 --- a/rest-api-spec/test/create/60_refresh.yaml +++ b/rest-api-spec/test/create/60_refresh.yaml @@ -1,5 +1,6 @@ --- "Refresh": + - do: indices.create: index: test_1 diff --git a/rest-api-spec/test/create/70_timestamp.yaml b/rest-api-spec/test/create/70_timestamp.yaml index 12fb697c581..f48a9fa494f 100644 --- a/rest-api-spec/test/create/70_timestamp.yaml +++ b/rest-api-spec/test/create/70_timestamp.yaml @@ -1,5 +1,6 @@ --- "Timestamp": + - do: indices.create: index: test_1 @@ -27,7 +28,8 @@ type: test id: 1 fields: _timestamp - - ok: fields._timestamp + + - is_true: fields._timestamp # milliseconds since epoch @@ -50,6 +52,7 @@ type: test id: 1 fields: _timestamp + - match: { fields._timestamp: 1372011280000 } # date format @@ -73,5 +76,6 @@ type: test id: 1 fields: _timestamp + - match: { fields._timestamp: 1372011280000 } diff --git a/rest-api-spec/test/create/75_ttl.yaml b/rest-api-spec/test/create/75_ttl.yaml index 012a6ba169d..e34d0c0b224 100644 --- a/rest-api-spec/test/create/75_ttl.yaml +++ b/rest-api-spec/test/create/75_ttl.yaml @@ -1,5 +1,6 @@ --- "TTL": + - do: indices.create: index: test_1 @@ -28,6 +29,7 @@ type: test id: 1 fields: _ttl + - lt: { fields._ttl: 10000} - gt: { fields._ttl: 0} @@ -51,6 +53,7 @@ type: test id: 1 fields: _ttl + - lt: { fields._ttl: 100000} - gt: { fields._ttl: 10000} @@ -75,6 +78,7 @@ type: test id: 1 fields: _ttl + - lt: { fields._ttl: 20000} - gt: { fields._ttl: 10000} diff --git a/rest-api-spec/test/delete/10_basic.yaml b/rest-api-spec/test/delete/10_basic.yaml index 0139d1c410a..0b93dcc75fb 100644 --- a/rest-api-spec/test/delete/10_basic.yaml +++ b/rest-api-spec/test/delete/10_basic.yaml @@ -1,5 +1,6 @@ --- "Basic": + - do: catch: missing delete: @@ -20,7 +21,8 @@ type: test id: 1 body: { foo: bar } - - ok: ok + + - is_true: ok - match: { _version: 3} - do: @@ -28,4 +30,5 @@ index: test_1 type: test id: 1 + - match: { _version: 4} diff --git a/rest-api-spec/test/delete/20_internal_version.yaml b/rest-api-spec/test/delete/20_internal_version.yaml index 11b3c085bd2..3d9ddb79366 100644 --- a/rest-api-spec/test/delete/20_internal_version.yaml +++ b/rest-api-spec/test/delete/20_internal_version.yaml @@ -1,11 +1,13 @@ --- "Internal version": + - do: index: index: test_1 type: test id: 1 body: { foo: bar } + - match: { _version: 1} - do: diff --git a/rest-api-spec/test/delete/25_external_version.yaml b/rest-api-spec/test/delete/25_external_version.yaml index 4a6e23dab58..453d64d85bb 100644 --- a/rest-api-spec/test/delete/25_external_version.yaml +++ b/rest-api-spec/test/delete/25_external_version.yaml @@ -1,5 +1,6 @@ --- "External version": + - do: index: index: test_1 @@ -8,6 +9,7 @@ body: { foo: bar } version_type: external version: 5 + - match: { _version: 5} - do: @@ -26,4 +28,5 @@ id: 1 version_type: external version: 6 + - match: { _version: 6} diff --git a/rest-api-spec/test/delete/30_routing.yaml b/rest-api-spec/test/delete/30_routing.yaml index da14bcafa76..b0d3ca3885f 100644 --- a/rest-api-spec/test/delete/30_routing.yaml +++ b/rest-api-spec/test/delete/30_routing.yaml @@ -1,5 +1,6 @@ --- "Routing": + - do: index: index: test_1 @@ -10,6 +11,7 @@ - do: cluster.health: wait_for_status: yellow + - do: catch: missing delete: diff --git a/rest-api-spec/test/delete/45_parent_with_routing.yaml b/rest-api-spec/test/delete/45_parent_with_routing.yaml index 4b7124a9941..76060f84f9c 100644 --- a/rest-api-spec/test/delete/45_parent_with_routing.yaml +++ b/rest-api-spec/test/delete/45_parent_with_routing.yaml @@ -1,5 +1,6 @@ --- "Parent with routing": + - do: indices.create: index: test_1 diff --git a/rest-api-spec/test/delete/50_refresh.yaml b/rest-api-spec/test/delete/50_refresh.yaml index f8b0b91885d..d74a1cdc2b6 100644 --- a/rest-api-spec/test/delete/50_refresh.yaml +++ b/rest-api-spec/test/delete/50_refresh.yaml @@ -1,5 +1,6 @@ --- "Refresh": + - do: indices.create: index: test_1 diff --git a/rest-api-spec/test/get/10_basic.yaml b/rest-api-spec/test/get/10_basic.yaml index 08896a5a260..147ec2f498a 100644 --- a/rest-api-spec/test/get/10_basic.yaml +++ b/rest-api-spec/test/get/10_basic.yaml @@ -1,5 +1,6 @@ --- "Basic GET": + - do: catch: missing get: diff --git a/rest-api-spec/test/get/20_fields.yaml b/rest-api-spec/test/get/20_fields.yaml index 0daa266ae83..d3c276fa494 100644 --- a/rest-api-spec/test/get/20_fields.yaml +++ b/rest-api-spec/test/get/20_fields.yaml @@ -1,5 +1,6 @@ --- "Fields": + - do: index: index: test_1 @@ -13,11 +14,11 @@ id: 1 fields: foo - - match: { _index: test_1 } - - match: { _type: test } - - match: { _id: 1 } - - match: { fields.foo: bar } - - not_ok: _source + - match: { _index: test_1 } + - match: { _type: test } + - match: { _id: 1 } + - match: { fields.foo: bar } + - is_false: _source - do: get: @@ -25,9 +26,10 @@ type: test id: 1 fields: [foo, count] - - match: { fields.foo: bar } - - match: { fields.count: 1 } - - not_ok: _source + + - match: { fields.foo: bar } + - match: { fields.count: 1 } + - is_false: _source - do: get: @@ -35,6 +37,7 @@ type: test id: 1 fields: [foo, count, _source] + - match: { fields.foo: bar } - match: { fields.count: 1 } - match: { _source.foo: bar } diff --git a/rest-api-spec/test/get/30_parent.yaml b/rest-api-spec/test/get/30_parent.yaml index 116eeb4a9c7..e10aa4edf31 100644 --- a/rest-api-spec/test/get/30_parent.yaml +++ b/rest-api-spec/test/get/30_parent.yaml @@ -1,5 +1,6 @@ --- "Parent": + - do: indices.create: index: test_1 @@ -26,6 +27,7 @@ id: 1 parent: 5 fields: [_parent, _routing] + - match: { _id: 1} - match: { fields._parent: 5} - match: { fields._routing: 5} diff --git a/rest-api-spec/test/get/40_routing.yaml b/rest-api-spec/test/get/40_routing.yaml index d7caddcdfae..d3ede246816 100644 --- a/rest-api-spec/test/get/40_routing.yaml +++ b/rest-api-spec/test/get/40_routing.yaml @@ -1,5 +1,6 @@ --- "Routing": + - do: index: index: test_1 @@ -17,6 +18,7 @@ id: 1 routing: 5 fields: [_routing] + - match: { _id: 1} - match: { fields._routing: 5} diff --git a/rest-api-spec/test/get/55_parent_with_routing.yaml b/rest-api-spec/test/get/55_parent_with_routing.yaml index 9cfaef09cbb..10615e6b219 100644 --- a/rest-api-spec/test/get/55_parent_with_routing.yaml +++ b/rest-api-spec/test/get/55_parent_with_routing.yaml @@ -1,5 +1,6 @@ --- "Parent with routing": + - do: indices.create: index: test_1 @@ -28,6 +29,7 @@ parent: 5 routing: 4 fields: [_parent, _routing] + - match: { _id: 1} - match: { fields._parent: 5} - match: { fields._routing: 4} diff --git a/rest-api-spec/test/index/10_with_id.yaml b/rest-api-spec/test/index/10_with_id.yaml index a7a11b6a7bd..3ecc2ab0ece 100644 --- a/rest-api-spec/test/index/10_with_id.yaml +++ b/rest-api-spec/test/index/10_with_id.yaml @@ -1,12 +1,14 @@ --- "Index with ID": + - do: index: index: test_1 type: test id: 1 body: { foo: bar } - - ok: ok + + - is_true: ok - match: { _index: test_1 } - match: { _type: test } - match: { _id: 1} @@ -17,6 +19,7 @@ index: test_1 type: test id: 1 + - match: { _index: test_1 } - match: { _type: test } - match: { _id: 1} diff --git a/rest-api-spec/test/index/15_without_id.yaml b/rest-api-spec/test/index/15_without_id.yaml index b983a0f05e2..ee740504aae 100644 --- a/rest-api-spec/test/index/15_without_id.yaml +++ b/rest-api-spec/test/index/15_without_id.yaml @@ -1,12 +1,14 @@ --- "Index without ID": + - do: index: index: test_1 type: test body: { foo: bar } - - ok: ok - - ok: _id + + - is_true: ok + - is_true: _id - match: { _index: test_1 } - match: { _type: test } - match: { _version: 1 } @@ -17,6 +19,7 @@ index: test_1 type: test id: '$id' + - match: { _index: test_1 } - match: { _type: test } - match: { _id: $id } diff --git a/rest-api-spec/test/index/20_optype.yaml b/rest-api-spec/test/index/20_optype.yaml index fe96d2a499d..60ae26d46d0 100644 --- a/rest-api-spec/test/index/20_optype.yaml +++ b/rest-api-spec/test/index/20_optype.yaml @@ -1,5 +1,6 @@ --- "Optype": + - do: index: index: test_1 diff --git a/rest-api-spec/test/index/30_internal_version.yaml b/rest-api-spec/test/index/30_internal_version.yaml index 331a489e235..1767fbebbf9 100644 --- a/rest-api-spec/test/index/30_internal_version.yaml +++ b/rest-api-spec/test/index/30_internal_version.yaml @@ -1,5 +1,6 @@ --- "Internal version": + - do: index: index: test_1 diff --git a/rest-api-spec/test/index/35_external_version.yaml b/rest-api-spec/test/index/35_external_version.yaml index c9f64d8ae69..0f8f923a07b 100644 --- a/rest-api-spec/test/index/35_external_version.yaml +++ b/rest-api-spec/test/index/35_external_version.yaml @@ -1,5 +1,6 @@ --- "External version": + - do: index: index: test_1 @@ -8,7 +9,9 @@ body: { foo: bar } version_type: external version: 5 + - match: { _version: 5} + - do: catch: conflict index: @@ -18,6 +21,7 @@ body: { foo: bar } version_type: external version: 5 + - do: index: index: test_1 @@ -26,4 +30,5 @@ body: { foo: bar } version_type: external version: 6 + - match: { _version: 6} diff --git a/rest-api-spec/test/index/40_routing.yaml b/rest-api-spec/test/index/40_routing.yaml index d7caddcdfae..b26144aca32 100644 --- a/rest-api-spec/test/index/40_routing.yaml +++ b/rest-api-spec/test/index/40_routing.yaml @@ -1,5 +1,6 @@ --- "Routing": + - do: index: index: test_1 @@ -10,6 +11,7 @@ - do: cluster.health: wait_for_status: yellow + - do: get: index: test_1 @@ -17,6 +19,7 @@ id: 1 routing: 5 fields: [_routing] + - match: { _id: 1} - match: { fields._routing: 5} diff --git a/rest-api-spec/test/index/55_parent_with_routing.yaml b/rest-api-spec/test/index/55_parent_with_routing.yaml index 9cfaef09cbb..10615e6b219 100644 --- a/rest-api-spec/test/index/55_parent_with_routing.yaml +++ b/rest-api-spec/test/index/55_parent_with_routing.yaml @@ -1,5 +1,6 @@ --- "Parent with routing": + - do: indices.create: index: test_1 @@ -28,6 +29,7 @@ parent: 5 routing: 4 fields: [_parent, _routing] + - match: { _id: 1} - match: { fields._parent: 5} - match: { fields._routing: 4} diff --git a/rest-api-spec/test/index/60_refresh.yaml b/rest-api-spec/test/index/60_refresh.yaml index 7a2d6910b22..2b11a070cc3 100644 --- a/rest-api-spec/test/index/60_refresh.yaml +++ b/rest-api-spec/test/index/60_refresh.yaml @@ -1,5 +1,6 @@ --- "Refresh": + - do: indices.create: index: test_1 diff --git a/rest-api-spec/test/index/70_timestamp.yaml b/rest-api-spec/test/index/70_timestamp.yaml index 90617020686..9e94795b2c1 100644 --- a/rest-api-spec/test/index/70_timestamp.yaml +++ b/rest-api-spec/test/index/70_timestamp.yaml @@ -1,5 +1,6 @@ --- "Timestamp": + - do: indices.create: index: test_1 @@ -27,7 +28,8 @@ type: test id: 1 fields: _timestamp - - ok: fields._timestamp + + - is_true: fields._timestamp # milliseconds since epoch @@ -45,6 +47,7 @@ type: test id: 1 fields: _timestamp + - match: { fields._timestamp: 1372011280000 } # date format @@ -63,5 +66,6 @@ type: test id: 1 fields: _timestamp + - match: { fields._timestamp: 1372011280000 } diff --git a/rest-api-spec/test/index/75_ttl.yaml b/rest-api-spec/test/index/75_ttl.yaml index c8e9447d778..34bf0fdba31 100644 --- a/rest-api-spec/test/index/75_ttl.yaml +++ b/rest-api-spec/test/index/75_ttl.yaml @@ -1,5 +1,6 @@ --- "TTL": + - do: indices.create: index: test_1 @@ -28,6 +29,7 @@ type: test id: 1 fields: _ttl + - lt: { fields._ttl: 10000} - gt: { fields._ttl: 0} @@ -46,6 +48,7 @@ type: test id: 1 fields: _ttl + - lt: { fields._ttl: 100000} - gt: { fields._ttl: 10000} @@ -65,6 +68,7 @@ type: test id: 1 fields: _ttl + - lt: { fields._ttl: 20000} - gt: { fields._ttl: 10000} diff --git a/rest-api-spec/test/info/10_info.yaml b/rest-api-spec/test/info/10_info.yaml index 328e4ecc085..94274535a75 100644 --- a/rest-api-spec/test/info/10_info.yaml +++ b/rest-api-spec/test/info/10_info.yaml @@ -1,12 +1,12 @@ --- "Info": - - do: {info: {}} - - match: { status: 200 } - - ok: ok - - ok: name - - ok: tagline - - ok: version - - ok: version.lucene_version - - ok: version.number + - do: {info: {}} + - match: {status: 200} + - is_true: ok + - is_true: name + - is_true: tagline + - is_true: version + - is_true: version.lucene_version + - is_true: version.number diff --git a/rest-api-spec/test/ping/10_ping.yaml b/rest-api-spec/test/ping/10_ping.yaml index 721527e7a58..ec07c218dab 100644 --- a/rest-api-spec/test/ping/10_ping.yaml +++ b/rest-api-spec/test/ping/10_ping.yaml @@ -1,4 +1,5 @@ --- "Ping": - - do: { ping: {}} + - do: { ping: {}} + - is_true: '' diff --git a/rest-api-spec/test/update/20_doc_upsert.yaml b/rest-api-spec/test/update/20_doc_upsert.yaml index 1faec1f4ed6..f34e030ff66 100644 --- a/rest-api-spec/test/update/20_doc_upsert.yaml +++ b/rest-api-spec/test/update/20_doc_upsert.yaml @@ -17,7 +17,7 @@ id: 1 - match: { _source.foo: baz } - - not_ok: _source.count + - is_false: _source.count - do: diff --git a/rest-api-spec/test/update/30_internal_version.yaml b/rest-api-spec/test/update/30_internal_version.yaml index 1208ff4d060..e0c5d2f4c60 100644 --- a/rest-api-spec/test/update/30_internal_version.yaml +++ b/rest-api-spec/test/update/30_internal_version.yaml @@ -1,5 +1,6 @@ --- "Internal version": + - skip: version: "0 - 0.90.9" reason: "Versions not supported by update API before 1.0.0" diff --git a/rest-api-spec/test/update/35_external_version.yaml b/rest-api-spec/test/update/35_external_version.yaml index f06ff53300a..35d9e11d157 100644 --- a/rest-api-spec/test/update/35_external_version.yaml +++ b/rest-api-spec/test/update/35_external_version.yaml @@ -1,5 +1,6 @@ --- "External version": + - skip: version: "0 - 0.90.9" reason: "Versions not supported by update API before 1.0.0" diff --git a/rest-api-spec/test/update/40_routing.yaml b/rest-api-spec/test/update/40_routing.yaml index 422701dc29c..c95c45b4ca7 100644 --- a/rest-api-spec/test/update/40_routing.yaml +++ b/rest-api-spec/test/update/40_routing.yaml @@ -1,5 +1,6 @@ --- "Routing": + - do: update: index: test_1 diff --git a/rest-api-spec/test/update/55_parent_with_routing.yaml b/rest-api-spec/test/update/55_parent_with_routing.yaml index 619f0e767f5..18d35d04552 100644 --- a/rest-api-spec/test/update/55_parent_with_routing.yaml +++ b/rest-api-spec/test/update/55_parent_with_routing.yaml @@ -1,5 +1,6 @@ --- "Parent with routing": + - do: indices.create: index: test_1 diff --git a/rest-api-spec/test/update/60_refresh.yaml b/rest-api-spec/test/update/60_refresh.yaml index eba3d67955f..f7379b5d456 100644 --- a/rest-api-spec/test/update/60_refresh.yaml +++ b/rest-api-spec/test/update/60_refresh.yaml @@ -1,5 +1,6 @@ --- "Refresh": + - do: indices.create: index: test_1 diff --git a/rest-api-spec/test/update/70_timestamp.yaml b/rest-api-spec/test/update/70_timestamp.yaml index 973db0655ca..368f750425f 100644 --- a/rest-api-spec/test/update/70_timestamp.yaml +++ b/rest-api-spec/test/update/70_timestamp.yaml @@ -1,5 +1,6 @@ --- "Timestamp": + - do: indices.create: index: test_1 @@ -29,7 +30,8 @@ type: test id: 1 fields: _timestamp - - ok: fields._timestamp + + - is_true: fields._timestamp # milliseconds since epoch @@ -49,6 +51,7 @@ type: test id: 1 fields: _timestamp + - match: { fields._timestamp: 1372011280000 } # date format @@ -69,5 +72,6 @@ type: test id: 1 fields: _timestamp + - match: { fields._timestamp: 1372011280000 } diff --git a/rest-api-spec/test/update/75_ttl.yaml b/rest-api-spec/test/update/75_ttl.yaml index 1ec32c8a664..707e0251918 100644 --- a/rest-api-spec/test/update/75_ttl.yaml +++ b/rest-api-spec/test/update/75_ttl.yaml @@ -1,5 +1,6 @@ --- "TTL": + - do: indices.create: index: test_1 @@ -30,6 +31,7 @@ type: test id: 1 fields: _ttl + - lt: { fields._ttl: 10000} - gt: { fields._ttl: 0} @@ -44,12 +46,14 @@ doc: { foo: baz } upsert: { foo: bar } ttl: 100000 + - do: get: index: test_1 type: test id: 1 fields: _ttl + - lt: { fields._ttl: 100000} - gt: { fields._ttl: 10000} @@ -71,6 +75,7 @@ type: test id: 1 fields: _ttl + - lt: { fields._ttl: 20000} - gt: { fields._ttl: 10000} diff --git a/rest-api-spec/test/update/80_fields.yaml b/rest-api-spec/test/update/80_fields.yaml index d8c6f1ef8c2..de70d1c7b73 100644 --- a/rest-api-spec/test/update/80_fields.yaml +++ b/rest-api-spec/test/update/80_fields.yaml @@ -11,9 +11,9 @@ doc: { foo: baz } upsert: { foo: bar } - - match: { get._source.foo: bar } - - match: { get.fields.foo: bar } - - not_ok: get.fields.bar + - match: { get._source.foo: bar } + - match: { get.fields.foo: bar } + - is_false: get.fields.bar #### ADD _routing etc diff --git a/rest-api-spec/test/update/85_fields_meta.yaml b/rest-api-spec/test/update/85_fields_meta.yaml index edc3a4b96d5..d3428883d9b 100644 --- a/rest-api-spec/test/update/85_fields_meta.yaml +++ b/rest-api-spec/test/update/85_fields_meta.yaml @@ -35,10 +35,10 @@ doc: { foo: baz } upsert: { foo: bar } - - match: { get.fields._parent: 5 } - - match: { get.fields._routing: 5 } - - ok: get.fields._timestamp - - ok: get.fields._ttl + - match: { get.fields._parent: 5 } + - match: { get.fields._routing: 5 } + - is_true: get.fields._timestamp + - is_true: get.fields._ttl - do: get: