-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path10_basic.yml
62 lines (62 loc) · 2.17 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
---
requires:
serverless: true
stack: true
---
setup:
- do:
indices.create: { index: 'transforms_test' }
- do:
bulk:
body:
- { index: { _index: 'transforms_test', _id: '1', data: { name: 'Africa', pop: 17.6} } }
- { index: { _index: 'transforms_test', _id: '2', data: { name: 'America', pop: 13 } } }
- { index: { _index: 'transforms_test', _id: '3', data: { name: 'Antarctica', pop: 0} } }
- { index: { _index: 'transforms_test', _id: '4', data: { name: 'Asia', pop: 59.4} } }
- { index: { _index: 'transforms_test', _id: '5', data: { name: 'Oceania', pop: 0.6} } }
- { index: { _index: 'transforms_test', _id: '6', data: { name: 'Europe', pop: 9.4} } }
---
teardown:
- do:
indices.delete: { index: 'transforms_test' }
---
'transform':
- do:
transform.put_transform:
transform_id: 'population'
body:
source: { index: 'transforms_test' }
dest: { index: 'transformed' }
pivot:
group_by: { pop: { terms: { field: 'pop' } } }
aggregations: { max_pop: { max: { field: 'pop' } } }
- is_true: 'acknowledged'
- do:
transform.update_transform:
transform_id: 'population'
body: { description: 'Continents approximate population' }
- match: { id: 'population' }
- do:
transform.get_transform: { transform_id: 'population' }
- match: { transforms.0.id: 'population' }
- do:
transform.get_transform_stats: { transform_id: 'population' }
- match: { transforms.0.id: 'population' }
- do:
transform.preview_transform: { transform_id: 'population' }
- is_true: 'preview'
- do:
transform.start_transform: { transform_id: 'population' }
- is_true: 'acknowledged'
- do:
transform.schedule_now_transform: { transform_id: 'population' }
- is_true: 'acknowledged'
- do:
transform.stop_transform: { transform_id: 'population', wait_for_completion: true }
- is_true: 'acknowledged'
- do:
transform.reset_transform: { transform_id: 'population' }
- is_true: 'acknowledged'
- do:
transform.delete_transform: { transform_id: 'population' }
- is_true: 'acknowledged'