Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dakrone committed Sep 5, 2024
1 parent 97d4326 commit a541a7b
Showing 1 changed file with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
indices.create:
index: <.myindex-{now/d}>

- do:
headers: { X-elastic-product-origin: kibana }
warnings_regex:
- "index name \\[.*\\] starts with a dot '\\.', in the next major version, index names starting with a dot are reserved for hidden indices and system indices"
indices.create:
index: <.myindex2-{now/d}>

---
"Reject auto-creation of dot-prefixed indices":
- requires:
Expand All @@ -38,6 +45,15 @@
id: "1"
body: {foo: bar}

- do:
headers: { X-elastic-product-origin: kibana }
warnings:
- "index name [.myindex2] starts with a dot '.', in the next major version, index names starting with a dot are reserved for hidden indices and system indices"
index:
index: .myindex2
id: "1"
body: {foo: bar}

- do:
warnings:
- "Index [.myindex3] name begins with a dot (.), which is deprecated, and will not be allowed in a future Elasticsearch version."
Expand Down Expand Up @@ -124,6 +140,17 @@
dest:
index: .reindex

- do:
headers: { X-elastic-product-origin: kibana }
warnings:
- "index name [.reindex2] starts with a dot '.', in the next major version, index names starting with a dot are reserved for hidden indices and system indices"
reindex:
body:
source:
index: original
dest:
index: .reindex2

---
"Reject index template that has a dot prefix index pattern":
- requires:
Expand All @@ -137,3 +164,12 @@
body:
index_patterns: [regular, .data-*]
data_stream: {}

- do:
headers: { X-elastic-product-origin: kibana }
warnings:
indices.put_index_template:
name: my-template
body:
index_patterns: [regular, .data2-*]
data_stream: {}

0 comments on commit a541a7b

Please sign in to comment.