rest-api-spec.test.pit.10_basic.yml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rest-api-spec Show documentation
Show all versions of rest-api-spec Show documentation
OpenSearch subproject :rest-api-spec
"Create PIT, Search with PIT ID and Delete":
- skip:
version: " - 2.3.99"
reason: "mode to be introduced later than 2.4"
- do:
indices.create:
index: test_pit
- do:
index:
index: test_pit
id: 42
body: { foo: 1 }
- do:
index:
index: test_pit
id: 43
body: { foo: 2 }
- do:
indices.refresh: {}
- do:
create_pit:
allow_partial_pit_creation: true
index: test_pit
keep_alive: 23h
- set: {pit_id: pit_id}
- match: { _shards.failed: 0}
- do:
search:
rest_total_hits_as_int: true
size: 1
sort: foo
body:
query:
match_all: {}
pit: {"id": "$pit_id"}
- match: {hits.total: 2 }
- length: {hits.hits: 1 }
- match: {hits.hits.0._id: "42" }
- do:
index:
index: test_pit
id: 44
body: { foo: 3 }
- do:
indices.refresh: {}
- do:
search:
rest_total_hits_as_int: true
size: 1
sort: foo
body:
query:
match_all: {}
pit: {"id": "$pit_id", "keep_alive":"10m"}
- match: {hits.total: 2 }
- length: {hits.hits: 1 }
- match: {hits.hits.0._id: "42" }
- do:
search:
rest_total_hits_as_int: true
index: test_pit
size: 1
sort: foo
body:
query:
match_all: {}
- match: {hits.total: 3 }
- length: {hits.hits: 1 }
- do:
get_all_pits: {}
- match: {pits.0.pit_id: $pit_id}
- match: {pits.0.keep_alive: 82800000 }
- do:
delete_pit:
body:
"pit_id": [$pit_id]
- match: {pits.0.pit_id: $pit_id}
- match: {pits.0.successful: true }
---
"Delete all":
- skip:
version: " - 2.3.99"
reason: "mode to be introduced later than 2.4"
- do:
indices.create:
index: test_pit
- do:
index:
index: test_pit
id: 42
body: { foo: 1 }
- do:
index:
index: test_pit
id: 43
body: { foo: 2 }
- do:
indices.refresh: {}
- do:
create_pit:
allow_partial_pit_creation: true
index: test_pit
keep_alive: 23h
- set: {pit_id: pit_id}
- match: { _shards.failed: 0}
- do:
get_all_pits: {}
- match: {pits.0.pit_id: $pit_id}
- match: {pits.0.keep_alive: 82800000 }
- do:
delete_all_pits: {}
- match: {pits.0.pit_id: $pit_id}
- match: {pits.0.successful: true }
- do:
delete_all_pits: {}
- match: {pits: []}
- length: {pits: 0}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy