diff --git a/doc/requirements.txt b/doc/requirements.txt index 1e152cfdc70..6598ecf1160 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -8,3 +8,6 @@ Pygments>=2.6.1 # BSD license os-api-ref>=2.1.0 # Apache-2.0 sphinxcontrib-apidoc>=0.3.0 # BSD sphinx-feature-classification>=1.1.0 # Apache 2.0 + +# redirect tests in docs +whereto>=0.4.0 # Apache-2.0 diff --git a/doc/test/redirect-tests.txt b/doc/test/redirect-tests.txt new file mode 100644 index 00000000000..9bceffa0a04 --- /dev/null +++ b/doc/test/redirect-tests.txt @@ -0,0 +1 @@ +/cinder/latest/man/cinder-manage.html 301 /cinder/latest/cli/cinder-manage.html diff --git a/tox.ini b/tox.ini index 291756f5e30..1945856eab7 100644 --- a/tox.ini +++ b/tox.ini @@ -114,7 +114,6 @@ sitepackages = False envdir = {toxworkdir}/pep8 commands = oslo-config-generator --config-file=tools/config/cinder-config-generator.conf - [testenv:genpolicy] 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} [testenv:docs] +allowlist_externals = rm deps = -r{toxinidir}/doc/requirements.txt commands = - rm -fr doc/source/contributor/api/ - rm -fr doc/build/html doc/build/doctrees + rm -rf doc/source/contributor/api doc/build/html doc/build/doctrees 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] deps = {[testenv:docs]deps}