-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path10_basic.yml
60 lines (60 loc) · 1.52 KB
/
10_basic.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
requires:
serverless: true
stack: true
---
setup:
- do:
indices.create: { index: 'sql_test' }
- do:
bulk:
body:
- { index: { _index: 'sql_test', _id: '42' } }
- { name: "The Hitchhiker's Guide to the Galaxy", author: 'Douglas Adams', release_date: '1979-10-12' }
- { index: { _index: 'sql_test', _id: '43' } }
- { name: 'Snow Crash', author: 'Neal Stephenson', release_date: '1992-06-01' }
- { index: { _index: 'sql_test', _id: '44' } }
- { name: 'Starship Troopers', author: 'Robert A. Heinlein', release_date: '1959-12-01' }
refresh: true
---
teardown:
- do:
indices.delete: { index: 'sql_test' }
---
'sql':
- do:
sql.query:
format: 'json'
body:
query: 'SELECT * FROM sql_test ORDER BY name'
fetch_size: 2
- set: { cursor: cursor }
- do:
sql.translate:
body: { query: 'SELECT * FROM sql_test ORDER BY name' }
- is_true: 'size'
- do:
sql.clear_cursor:
body: { cursor: $cursor }
- is_true: 'succeeded'
---
'async_sql':
- do:
sql.query:
format: 'json'
body:
keep_alive: '1d'
wait_for_completion_timeout: '0s'
query: 'SELECT * FROM sql_test ORDER BY name'
fetch_size: 1
- set: { id: id }
- do:
sql.get_async_status:
id: $id
- match: { id: $id }
- do:
sql.get_async: { id: $id }
- match: { id: $id }
- do:
sql.delete_async: { id: $id }
- is_true: 'acknowledged'