tempest/releasenotes/notes/add-redirect-param-bea1f6fbce629c70.yaml
Jens Harbott 3ffa54e446 Allow to create a rest_client not following redirects
Some tests need to verify that the first response from an API is indeed
a redirect, this can not be done if the client automatically follows
redirects. Introduce a parameter that allows consumers to disable the
default behaviour, so that they can see the 301 response instead.

Change-Id: I366fa8d1971cd7502a1cd985f5ee6ad5e1ecb216
Closes-Bug: 1616892
2018-10-11 08:07:38 +00:00

17 lines
735 B
YAML

---
features:
- |
A new parameter ``follow_redirects`` has been added to the class
``RestClient``, which is passed through to ``ClosingHttp`` or
``ClosingProxyHttp`` respectively. The default value is ``True``
which corresponds to the previous behaviour of following up to five
redirections before returning a response. Setting
``follow_redirects = False`` allows to disable this behaviour, so
that any redirect that is received is directly returned to the caller.
This allows tests to verify that an API is responding with a redirect.
fixes:
- |
[`bug 1616892 <https://bugs.launchpad.net/tempest/+bug/1616892>`_]
Tempest now allows tests to verify that an API responds with a
redirect.