mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-07 21:48:39 +00:00
Some yaml tests still used the 'gtelte' feature in their skip section. Since all language clients support this, the feature skip can be removed.
101 lines
1.8 KiB
YAML
101 lines
1.8 KiB
YAML
---
|
|
"TTL":
|
|
|
|
- do:
|
|
indices.create:
|
|
index: test_1
|
|
body:
|
|
mappings:
|
|
test:
|
|
_ttl:
|
|
enabled: 1
|
|
default: 10s
|
|
- do:
|
|
cluster.health:
|
|
wait_for_status: yellow
|
|
|
|
# blank ttl
|
|
- do:
|
|
create:
|
|
index: test_1
|
|
type: test
|
|
id: 1
|
|
body: { foo: bar }
|
|
|
|
- do:
|
|
get:
|
|
index: test_1
|
|
type: test
|
|
id: 1
|
|
fields: _ttl
|
|
|
|
- lte: { fields._ttl: 10000}
|
|
- gt: { fields._ttl: 0}
|
|
|
|
# milliseconds
|
|
|
|
- do:
|
|
delete:
|
|
index: test_1
|
|
type: test
|
|
id: 1
|
|
- do:
|
|
create:
|
|
index: test_1
|
|
type: test
|
|
id: 1
|
|
body: { foo: bar }
|
|
ttl: 100000
|
|
- do:
|
|
get:
|
|
index: test_1
|
|
type: test
|
|
id: 1
|
|
fields: _ttl
|
|
|
|
- lte: { fields._ttl: 100000}
|
|
- gt: { fields._ttl: 10000}
|
|
|
|
# duration
|
|
|
|
- do:
|
|
delete:
|
|
index: test_1
|
|
type: test
|
|
id: 1
|
|
- do:
|
|
create:
|
|
index: test_1
|
|
type: test
|
|
id: 1
|
|
body: { foo: bar }
|
|
ttl: 20s
|
|
|
|
- do:
|
|
get:
|
|
index: test_1
|
|
type: test
|
|
id: 1
|
|
fields: _ttl
|
|
|
|
- lte: { fields._ttl: 20000}
|
|
- gt: { fields._ttl: 10000}
|
|
|
|
# with timestamp
|
|
|
|
- do:
|
|
delete:
|
|
index: test_1
|
|
type: test
|
|
id: 1
|
|
- do:
|
|
catch: /AlreadyExpiredException/
|
|
create:
|
|
index: test_1
|
|
type: test
|
|
id: 1
|
|
body: { foo: bar }
|
|
ttl: 20s
|
|
timestamp: 2013-06-23T18:14:40
|
|
|