Skip to content

Commit 39fb763

Browse files
committed
Backports from main:
- Updates variable names in rollover test - Updates data streams test This is just to avoid clashing with my-template from data streams test in case that other test fails to delete the data stream.
1 parent 85cfe97 commit 39fb763

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

tests/indices/data_streams.yml

+3
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,6 @@ teardown:
4040
indices.delete_data_stream:
4141
name: logs-test
4242
- is_true: acknowledged
43+
- do:
44+
cluster.health:
45+
wait_for_status: green

tests/indices/rollover.yml

+15-15
Original file line numberDiff line numberDiff line change
@@ -5,55 +5,55 @@ requires:
55
---
66
teardown:
77
- do:
8-
indices.delete: { index: logs-1, ignore: 404 }
8+
indices.delete: { index: test-logs-1, ignore: 404 }
99
- do:
10-
indices.delete: { index: logs-000002, ignore: 404 }
10+
indices.delete: { index: test-logs-000002, ignore: 404 }
1111
---
1212
"Rollover index via API":
1313
# create index with alias
1414
- do:
1515
indices.create:
16-
index: logs-1
16+
index: test-logs-1
1717
body:
1818
aliases:
19-
logs_index: {}
20-
logs_search: {}
19+
test_logs_index: {}
20+
test_logs_search: {}
2121

2222
# index document
2323
- do:
2424
index:
25-
index: logs-1
25+
index: test-logs-1
2626
id: "1"
2727
body: { "foo": "hello world" }
2828
# make this doc visible in index stats
2929
refresh: true
3030
- do:
3131
get:
32-
index: logs_search
32+
index: test_logs_search
3333
id: "1"
34-
- match: { _index: logs-1 }
34+
- match: { _index: test-logs-1 }
3535
- match: { _id: "1" }
3636
- match: { _source: { foo: "hello world" } }
3737

3838
# perform alias rollover
3939
- do:
4040
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 }
4444
- match: { rolled_over: true }
4545
- match: { dry_run: false }
4646

4747
# ensure new index is created
4848
- do:
4949
indices.exists:
50-
index: logs-000002
50+
index: test-logs-000002
5151
- is_true: ''
5252

5353
# index into new index
5454
- do:
5555
index:
56-
index: logs-000002
56+
index: test-logs-000002
5757
id: "2"
5858
body: { "foo": "hello world" }
5959
- do:
@@ -63,6 +63,6 @@ teardown:
6363
- do:
6464
search:
6565
rest_total_hits_as_int: true
66-
index: logs_search
66+
index: test_logs_search
6767
- match: { hits.total: 1 }
68-
- match: { hits.hits.0._index: "logs-000002"}
68+
- match: { hits.hits.0._index: "test-logs-000002"}

0 commit comments

Comments
 (0)