Can't use both warning and catch in a yamlRestTest #76316
Labels
>bug
:Core/Infra/REST API
REST infrastructure and utilities
Team:Core/Infra
Meta label for core/infra team
I discovered this while I was working on #75951. For one of the tests I wanted to write there, the expected outcome is that I'd get both a json body error from ES, and also a warning header. It turns out, though, if you use a
catch
, then any associatedwarning
elements from the test are ignored.It's easy enough to see why that is in the code.
checkWarningHeaders
is called after a successful response, but error responses go into the catch block forcatch
processing, and there's no associated call tocheckWarningHeaders
there.^ appears to do the trick, but then there are failures in the yamlRestCompatTests -- I suppose that means that some of our tests incidentally happen to rely on the current behavior.
The text was updated successfully, but these errors were encountered: