File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
test_elasticsearch/test_server Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 34
34
"catch_unauthorized" ,
35
35
"default_shards" ,
36
36
"warnings" ,
37
+ "allowed_warnings" ,
37
38
}
38
39
39
40
# broken YAML tests on some releases
@@ -150,6 +151,7 @@ def run_do(self, action):
150
151
headers = action .pop ("headers" , None )
151
152
catch = action .pop ("catch" , None )
152
153
warn = action .pop ("warnings" , ())
154
+ allowed_warnings = action .pop ("allowed_warnings" , ())
153
155
assert len (action ) == 1
154
156
155
157
method , args = list (action .items ())[0 ]
@@ -189,11 +191,12 @@ def run_do(self, action):
189
191
str (w .message )
190
192
for w in caught_warnings
191
193
if w .category == ElasticsearchDeprecationWarning
194
+ and str (w .message ) not in allowed_warnings
192
195
]
193
196
194
197
# Sorting removes the issue with order raised. We only care about
195
198
# if all warnings are raised in the single API call.
196
- if sorted (warn ) != sorted (caught_warnings ):
199
+ if warn and sorted (warn ) != sorted (caught_warnings ):
197
200
raise AssertionError (
198
201
"Expected warnings not equal to actual warnings: expected=%r actual=%r"
199
202
% (warn , caught_warnings )
You can’t perform that action at this time.
0 commit comments