Test search templates during rolling upgrade test (#24258)
In #24251 we fix an issue with stored search templates that this test would have discovered: stored search templates cause the node to refuse to start. Technically a "restart" test would have caught this as well and would have caught it more quickly. But we already *have* an upgrade test and we don't have restart tests. And testing this on upgrade is a good thing too.
This commit is contained in:
parent
d4a6ba8ec9
commit
4423e1b78f
|
@ -59,6 +59,16 @@
|
||||||
|
|
||||||
- match: { hits.total: 10 }
|
- match: { hits.total: 10 }
|
||||||
|
|
||||||
|
---
|
||||||
|
"Verify that we can still find things with the template":
|
||||||
|
- do:
|
||||||
|
search_template:
|
||||||
|
body:
|
||||||
|
id: test_search_template
|
||||||
|
params:
|
||||||
|
f1: v5_old
|
||||||
|
- match: { hits.total: 1 }
|
||||||
|
|
||||||
---
|
---
|
||||||
"Verify custom cluster metadata still exists during upgrade":
|
"Verify custom cluster metadata still exists during upgrade":
|
||||||
- do:
|
- do:
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
---
|
---
|
||||||
"Index data and search on the old cluster":
|
"Index data, search, and create things in the cluster state that we'll validate are there after the ugprade":
|
||||||
- do:
|
- do:
|
||||||
indices.create:
|
indices.create:
|
||||||
index: test_index
|
index: test_index
|
||||||
body:
|
body:
|
||||||
settings:
|
settings:
|
||||||
index:
|
index:
|
||||||
number_of_replicas: 0
|
number_of_replicas: 0
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
bulk:
|
bulk:
|
||||||
refresh: true
|
refresh: true
|
||||||
body:
|
body:
|
||||||
- '{"index": {"_index": "test_index", "_type": "test_type"}}'
|
- '{"index": {"_index": "test_index", "_type": "test_type"}}'
|
||||||
|
@ -23,18 +23,16 @@
|
||||||
- '{"index": {"_index": "test_index", "_type": "test_type"}}'
|
- '{"index": {"_index": "test_index", "_type": "test_type"}}'
|
||||||
- '{"f1": "v5_old", "f2": 4}'
|
- '{"f1": "v5_old", "f2": 4}'
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
indices.flush:
|
indices.flush:
|
||||||
index: test_index
|
index: test_index
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
search:
|
search:
|
||||||
index: test_index
|
index: test_index
|
||||||
|
|
||||||
- match: { hits.total: 5 }
|
- match: { hits.total: 5 }
|
||||||
|
|
||||||
---
|
|
||||||
"Add stuff to cluster state so that we can verify that it remains to exist during and after the rolling upgrade":
|
|
||||||
- do:
|
- do:
|
||||||
snapshot.create_repository:
|
snapshot.create_repository:
|
||||||
repository: my_repo
|
repository: my_repo
|
||||||
|
@ -54,3 +52,20 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
- match: { "acknowledged": true }
|
- match: { "acknowledged": true }
|
||||||
|
|
||||||
|
- do:
|
||||||
|
put_template:
|
||||||
|
id: test_search_template
|
||||||
|
body:
|
||||||
|
query:
|
||||||
|
match:
|
||||||
|
f1: "{{f1}}"
|
||||||
|
- match: { acknowledged: true }
|
||||||
|
|
||||||
|
- do:
|
||||||
|
search_template:
|
||||||
|
body:
|
||||||
|
id: test_search_template
|
||||||
|
params:
|
||||||
|
f1: v5_old
|
||||||
|
- match: { hits.total: 1 }
|
||||||
|
|
|
@ -36,6 +36,16 @@
|
||||||
|
|
||||||
- match: { hits.total: 15 } # 10 docs from previous clusters plus 5 new docs
|
- match: { hits.total: 15 } # 10 docs from previous clusters plus 5 new docs
|
||||||
|
|
||||||
|
---
|
||||||
|
"Verify that we can still find things with the template":
|
||||||
|
- do:
|
||||||
|
search_template:
|
||||||
|
body:
|
||||||
|
id: test_search_template
|
||||||
|
params:
|
||||||
|
f1: v5_old
|
||||||
|
- match: { hits.total: 1 }
|
||||||
|
|
||||||
---
|
---
|
||||||
"Verify custom cluster metadata still exists after rolling upgrade":
|
"Verify custom cluster metadata still exists after rolling upgrade":
|
||||||
- do:
|
- do:
|
||||||
|
|
Loading…
Reference in New Issue