@@ -5,55 +5,55 @@ requires:
5
5
---
6
6
teardown :
7
7
- do :
8
- indices.delete : { index: logs-1, ignore: 404 }
8
+ indices.delete : { index: test- logs-1, ignore: 404 }
9
9
- do :
10
- indices.delete : { index: logs-000002, ignore: 404 }
10
+ indices.delete : { index: test- logs-000002, ignore: 404 }
11
11
---
12
12
" Rollover index via API " :
13
13
# create index with alias
14
14
- do :
15
15
indices.create :
16
- index : logs-1
16
+ index : test- logs-1
17
17
body :
18
18
aliases :
19
- logs_index : {}
20
- logs_search : {}
19
+ test_logs_index : {}
20
+ test_logs_search : {}
21
21
22
22
# index document
23
23
- do :
24
24
index :
25
- index : logs-1
25
+ index : test- logs-1
26
26
id : " 1"
27
27
body : { "foo": "hello world" }
28
28
# make this doc visible in index stats
29
29
refresh : true
30
30
- do :
31
31
get :
32
- index : logs_search
32
+ index : test_logs_search
33
33
id : " 1"
34
- - match : { _index: logs-1 }
34
+ - match : { _index: test- logs-1 }
35
35
- match : { _id: "1" }
36
36
- match : { _source: { foo: "hello world" } }
37
37
38
38
# perform alias rollover
39
39
- do :
40
40
indices.rollover :
41
- alias : " logs_search "
42
- - match : { old_index: logs-1 }
43
- - match : { new_index: logs-000002 }
41
+ alias : " test_logs_search "
42
+ - match : { old_index: test- logs-1 }
43
+ - match : { new_index: test- logs-000002 }
44
44
- match : { rolled_over: true }
45
45
- match : { dry_run: false }
46
46
47
47
# ensure new index is created
48
48
- do :
49
49
indices.exists :
50
- index : logs-000002
50
+ index : test- logs-000002
51
51
- is_true : ' '
52
52
53
53
# index into new index
54
54
- do :
55
55
index :
56
- index : logs-000002
56
+ index : test- logs-000002
57
57
id : " 2"
58
58
body : { "foo": "hello world" }
59
59
- do :
@@ -63,6 +63,6 @@ teardown:
63
63
- do :
64
64
search :
65
65
rest_total_hits_as_int : true
66
- index : logs_search
66
+ index : test_logs_search
67
67
- match : { hits.total: 1 }
68
- - match : { hits.hits.0._index: "logs-000002"}
68
+ - match : { hits.hits.0._index: "test- logs-000002"}
0 commit comments