Skip to content

Commit f9a084b

Browse files
authored
[8.11] Yaml test for #101489 (#101685) (#101686)
* Yaml test for #101489 (#101685) * Add warnings to test
1 parent c6999a3 commit f9a084b

File tree

1 file changed

+75
-6
lines changed
  • x-pack/plugin/esql/qa/server/single-node/src/yamlRestTest/resources/rest-api-spec/test

1 file changed

+75
-6
lines changed

x-pack/plugin/esql/qa/server/single-node/src/yamlRestTest/resources/rest-api-spec/test/100_bug_fix.yml

Lines changed: 75 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
setup:
2+
"Bug fix https://github.com/elastic/elasticsearch/issues/99472":
3+
- skip:
4+
features: warnings
35
- do:
46
bulk:
57
index: test
@@ -9,11 +11,6 @@ setup:
911
- { "emp_no": 10, "ip1": "127.0", "ip2": "0.1" }
1012
- { "index": { } }
1113
- { "emp_no": 20 }
12-
13-
---
14-
"Bug fix https://github.com/elastic/elasticsearch/issues/99472":
15-
- skip:
16-
features: warnings
1714
- do:
1815
warnings:
1916
- "Line 1:37: evaluation of [to_ip(coalesce(ip1.keyword, \"255.255.255.255\"))] failed, treating result as null. Only first 20 failures recorded."
@@ -55,3 +52,75 @@ setup:
5552
- length: { values: 2 }
5653
- match: { values.0: [ 10, "127.00.1", "127.00.1", null ] }
5754
- match: { values.1: [ 20, null, "255.255.255.255", "255.255.255.255"] }
55+
56+
---
57+
"Bug fix https://github.com/elastic/elasticsearch/issues/101489":
58+
- skip:
59+
features: warnings
60+
- do:
61+
indices.create:
62+
index: index1
63+
body:
64+
mappings:
65+
properties:
66+
http:
67+
properties:
68+
headers:
69+
type: flattened
70+
- do:
71+
indices.create:
72+
index: index2
73+
body:
74+
mappings:
75+
properties:
76+
http:
77+
properties:
78+
headers:
79+
properties:
80+
location:
81+
type: keyword
82+
- do:
83+
indices.create:
84+
index: index3
85+
body:
86+
mappings:
87+
properties:
88+
http:
89+
properties:
90+
headers:
91+
properties:
92+
location:
93+
type: text
94+
- do:
95+
bulk:
96+
refresh: true
97+
body:
98+
- { "index": { "_index": "index1" } }
99+
- { "http.headers": { "location": "RO","code": 123 } }
100+
- { "index": { "_index": "index2" } }
101+
- { "http.headers.location": "US" }
102+
- { "index": { "_index": "index3" } }
103+
- { "http.headers.location": "CN" }
104+
- do:
105+
warnings:
106+
- "Field [http.headers] cannot be retrieved, it is unsupported or not indexed; returning null"
107+
- "Field [http.headers.location] cannot be retrieved, it is unsupported or not indexed; returning null"
108+
esql.query:
109+
body:
110+
query: 'from index* [metadata _index] | limit 5 | sort _index desc'
111+
- match: { columns.0.name: http.headers }
112+
- match: { columns.0.type: unsupported }
113+
- match: { columns.1.name: http.headers.location }
114+
- match: { columns.1.type: unsupported }
115+
- match: { columns.2.name: _index }
116+
- match: { columns.2.type: keyword }
117+
- length: { values: 3 }
118+
- match: { values.0.0: null }
119+
- match: { values.0.1: null }
120+
- match: { values.0.2: index3 }
121+
- match: { values.1.0: null }
122+
- match: { values.1.1: null }
123+
- match: { values.1.2: index2 }
124+
- match: { values.2.0: null }
125+
- match: { values.2.1: null }
126+
- match: { values.2.2: index1 }

0 commit comments

Comments
 (0)