-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path10_basic.yml
63 lines (63 loc) · 1.46 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
61
62
63
---
requires:
serverless: true
stack: true
---
setup:
- do:
indices.create:
index: 'my_app_1'
- do:
indices.create:
index: 'my_app_2'
---
teardown:
- do:
indices.delete:
index: 'my_app_1'
- do:
indices.delete:
index: 'my_app_2'
---
'search_application':
- do:
search_application.put:
name: 'search_app'
body:
indices: ['my_app_1', 'my_app_2']
template:
script:
source:
query:
query_string:
query: '{{query_string}}'
default_field: '{{default_field}}'
params:
query_string: '*'
default_field: '*'
dictionary:
properties:
query_string: { type: 'string' }
default_field:
type: 'string'
enum: ['title', 'description']
additionalProperties: false
required: ['query_string']
- match: { result: 'created' }
- do:
search_application.get:
name: 'search_app'
- match: { name: 'search_app' }
- do:
search_application.search:
name: 'search_app'
body:
params: { query_string: 'test' }
- is_true: hits
- do:
search_application.list: {}
- gt: { count: 0 }
- do:
search_application.delete:
name: 'search_app'
- match: { acknowledged: true }