docs: Add whereto for testing redirect rules

Use whereto to test that the redirect rules do what we expect. This has
been used in nova-land for years and is helpful as things move around.

Change-Id: I4697c4ce53eb8d67d2f7593085e3eb88f239d1dd
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane 2021-09-24 17:31:36 +01:00
parent 8b5705156c
commit 31303ed65e
3 changed files with 8 additions and 4 deletions

View File

@ -8,3 +8,6 @@ Pygments>=2.6.1 # BSD license
os-api-ref>=2.1.0 # Apache-2.0 os-api-ref>=2.1.0 # Apache-2.0
sphinxcontrib-apidoc>=0.3.0 # BSD sphinxcontrib-apidoc>=0.3.0 # BSD
sphinx-feature-classification>=1.1.0 # Apache 2.0 sphinx-feature-classification>=1.1.0 # Apache 2.0
# redirect tests in docs
whereto>=0.4.0 # Apache-2.0

View File

@ -0,0 +1 @@
/cinder/latest/man/cinder-manage.html 301 /cinder/latest/cli/cinder-manage.html

View File

@ -114,7 +114,6 @@ sitepackages = False
envdir = {toxworkdir}/pep8 envdir = {toxworkdir}/pep8
commands = oslo-config-generator --config-file=tools/config/cinder-config-generator.conf commands = oslo-config-generator --config-file=tools/config/cinder-config-generator.conf
[testenv:genpolicy] [testenv:genpolicy]
commands = oslopolicy-sample-generator --config-file=tools/config/cinder-policy-generator.conf commands = oslopolicy-sample-generator --config-file=tools/config/cinder-policy-generator.conf
@ -127,13 +126,14 @@ commands = python tools/config/generate_cinder_opts.py
commands = {posargs} commands = {posargs}
[testenv:docs] [testenv:docs]
allowlist_externals = rm
deps = deps =
-r{toxinidir}/doc/requirements.txt -r{toxinidir}/doc/requirements.txt
commands = commands =
rm -fr doc/source/contributor/api/ rm -rf doc/source/contributor/api doc/build/html doc/build/doctrees
rm -fr doc/build/html doc/build/doctrees
sphinx-build -W -j auto -b html -d doc/build/doctrees doc/source doc/build/html sphinx-build -W -j auto -b html -d doc/build/doctrees doc/source doc/build/html
allowlist_externals = rm # Test the redirects. This must run after the main docs build
whereto doc/build/html/.htaccess doc/test/redirect-tests.txt
[testenv:pdf-docs] [testenv:pdf-docs]
deps = {[testenv:docs]deps} deps = {[testenv:docs]deps}