Update docs.openstack.org redirect test

Our testinfra/test_static.py set of test cases has a test case for
docs.openstack.org redirects to the latest openstack version. This was a
301 permanent redirect which was not correct because new openstack
versions are created and the redirect gets updated. To fix this the
redirect was updated to a 302 temporary redirect in this change [0].

Unfortunately, this means our test infra test case is broken. This
change updates our test case to look for a 302 redirect instead of 301
to fix this. I checked the other redirect tests we run and they all
appear to match reality of 301s still.

[0] https://review.opendev.org/c/openstack/openstack-manuals/+/962684

Change-Id: Ia05396d51288eb7ef3847e6bc3ed30c8e2ee7b9b
This commit is contained in:
Clark Boylan
2025-10-03 09:08:58 -07:00
parent aafa1c85d2
commit b0a115c055

View File

@@ -108,7 +108,7 @@ def test_docs_openstack_org(host):
cmd = host.run('curl --resolve docs.openstack.org:443:127.0.0.1 '
'https://docs.openstack.org')
# links to the latest, make sure it redirected us
assert '301 Moved Permanently' in cmd.stdout
assert '302 Found' in cmd.stdout
def test_docs_opendev_org(host):
cmd = host.run('curl --resolve docs.opendev.org:443:127.0.0.1 '