X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/e1cee0a8ebb0728bcb62e89530c11ea8dc072371..b64a7596b2fb456de13aa885dbe14a817fd8d5b2:/services/api/test/integration/errors_test.rb diff --git a/services/api/test/integration/errors_test.rb b/services/api/test/integration/errors_test.rb index d04e383831..04843adcf7 100644 --- a/services/api/test/integration/errors_test.rb +++ b/services/api/test/integration/errors_test.rb @@ -14,6 +14,7 @@ class ErrorsTest < ActionDispatch::IntegrationTest assert_nil assigns(:object) assert_not_nil json_response['errors'] assert_response 404 + assert_match /^req-[0-9a-zA-Z]{20}$/, response.headers['X-Request-Id'] end end @@ -28,4 +29,11 @@ class ErrorsTest < ActionDispatch::IntegrationTest "Unexpected new route: #{route.path.spec}") end end + + test "X-Request-Id header format on non-existant object URL" do + get "/arvados/v1/container_requests/invalid", + params: {:format => :json}, headers: auth(:active) + assert_response 404 + assert_match /^req-[0-9a-zA-Z]{20}$/, response.headers['X-Request-Id'] + end end