Skip to content

Commit 36fbb4c

Browse files
authored
Harmonize include_defaults tests (#30700)
This PR breaks the include_defaults functionality of the get settings API into its own test, which is skipped for mixed-mode clusters containing pre-6.4 nodes.
1 parent 40534cc commit 36fbb4c

File tree

2 files changed

+28
-12
lines changed

2 files changed

+28
-12
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
setup:
3+
- do:
4+
indices.create:
5+
body:
6+
settings:
7+
index:
8+
number_of_shards: 1
9+
number_of_replicas: 1
10+
index: test-index
11+
---
12+
Test retrieval of default settings:
13+
- skip:
14+
version: " - 6.3.99"
15+
reason: include_defaults will not work in mixed-mode clusters containing nodes pre-6.4
16+
- do:
17+
indices.get_settings:
18+
flat_settings: true
19+
index: test-index
20+
- is_false:
21+
test-index.settings.index\.refresh_interval
22+
- do:
23+
indices.get_settings:
24+
include_defaults: true
25+
flat_settings: true
26+
index: test-index
27+
- match:
28+
test-index.defaults.index\.refresh_interval: "1s"

rest-api-spec/src/main/resources/rest-api-spec/test/indices.put_settings/11_reset.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,3 @@ Test reset index settings:
2323
indices.get_settings:
2424
flat_settings: false
2525
- is_false: test-index.settings.index\.refresh_interval
26-
27-
# Disabled until https://github.com/elastic/elasticsearch/pull/29229 is back-ported
28-
# That PR changed the execution path of index settings default to be on the master
29-
# until the PR is back-ported the old master will not return default settings.
30-
#
31-
# - do:
32-
# indices.get_settings:
33-
# include_defaults: true
34-
# flat_settings: true
35-
# index: test-index
36-
# - match:
37-
# test-index.defaults.index\.refresh_interval: "1s"

0 commit comments

Comments
 (0)