Skip to content

Commit

Permalink
Support catching HTTP Gone (410) response codes in YAML REST tests (#…
Browse files Browse the repository at this point in the history
…98752)

As a follow up to #97397, we want the ability to assert on unavailable
API endpoints that return a 410 status code. This PR adds this support
to our YAML testing framework.

cc @swallez
  • Loading branch information
mark-vieira authored Aug 22, 2023
1 parent 4a69793 commit 35459cd
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@ private String formatStatusCodeMessage(ClientYamlTestResponse restTestResponse,
Map.entry("missing", tuple("404", equalTo(404))),
Map.entry("request_timeout", tuple("408", equalTo(408))),
Map.entry("conflict", tuple("409", equalTo(409))),
Map.entry("gone", tuple("410", equalTo(410))),
Map.entry("unavailable", tuple("503", equalTo(503))),
Map.entry(
"request",
Expand All @@ -566,7 +567,8 @@ private String formatStatusCodeMessage(ClientYamlTestResponse restTestResponse,
not(equalTo(403)),
not(equalTo(404)),
not(equalTo(408)),
not(equalTo(409))
not(equalTo(409)),
not(equalTo(410))
)
)
)
Expand Down

0 comments on commit 35459cd

Please sign in to comment.