From 6f07828bf044e5eda53037e986d9ae642ee499af Mon Sep 17 00:00:00 2001 From: Eric Fried Date: Mon, 4 Nov 2019 17:42:57 -0600 Subject: [PATCH] Add redirect testing Adds a dependency on and invocation of the `whereto` command to validate redirects in the .htaccess file during doc builds. Change-Id: Ib6cc2953f0fd774de3c3a0c8a2bd6cff49667c14 --- doc/requirements.txt | 3 +++ doc/test/redirect-tests.txt | 18 ++++++++++++++++++ tox.ini | 2 ++ 3 files changed, 23 insertions(+) create mode 100644 doc/test/redirect-tests.txt diff --git a/doc/requirements.txt b/doc/requirements.txt index ec692e75a..8639f9360 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -7,6 +7,9 @@ sphinx!=1.6.6,!=1.6.7,>=1.6.5,<2.0.0;python_version=='2.7' # BSD sphinx!=1.6.6,!=1.6.7,>=1.6.5;python_version>='3.4' # BSD sphinxcontrib-apidoc>=0.2.0 # BSD +# redirect tests in docs +whereto>=0.4.0 # Apache-2.0 + # Install these to generate sphinx autodocs aodhclient>=0.9.0 # Apache-2.0 gnocchiclient>=3.3.1 # Apache-2.0 diff --git a/doc/test/redirect-tests.txt b/doc/test/redirect-tests.txt new file mode 100644 index 000000000..9473d6922 --- /dev/null +++ b/doc/test/redirect-tests.txt @@ -0,0 +1,18 @@ +/python-openstackclient/latest/command-objects/this-is-a-test.html 301 /python-openstackclient/latest/cli/command-objects/this-is-a-test.html +/python-openstackclient/latest/authentication.html 301 /python-openstackclient/latest/cli/authentication.html +/python-openstackclient/latest/backward-incompatible.html 301 /python-openstackclient/latest/cli/backward-incompatible.html +/python-openstackclient/latest/command-list.html 301 /python-openstackclient/latest/cli/command-list.html +/python-openstackclient/latest/commands.html 301 /python-openstackclient/latest/cli/commands.html +/python-openstackclient/latest/decoder.html 301 /python-openstackclient/latest/cli/decoder.html +/python-openstackclient/latest/interactive.html 301 /python-openstackclient/latest/cli/interactive.html +/python-openstackclient/latest/plugin-commands.html 301 /python-openstackclient/latest/cli/plugin-commands.html +/python-openstackclient/latest/specs/this-is-a-test.html 301 /python-openstackclient/latest/contributor/specs/this-is-a-test.html +/python-openstackclient/latest/command-beta.html 301 /python-openstackclient/latest/contributor/command-beta.html +/python-openstackclient/latest/command-errors.html 301 /python-openstackclient/latest/contributor/command-errors.html +/python-openstackclient/latest/command-logs.html 301 /python-openstackclient/latest/contributor/command-logs.html +/python-openstackclient/latest/command-options.html 301 /python-openstackclient/latest/contributor/command-options.html +/python-openstackclient/latest/command-wrappers.html 301 /python-openstackclient/latest/contributor/command-wrappers.html +/python-openstackclient/latest/developing.html 301 /python-openstackclient/latest/contributor/developing.html +/python-openstackclient/latest/humaninterfaceguide.html 301 /python-openstackclient/latest/contributor/humaninterfaceguide.html +/python-openstackclient/latest/plugins.html 301 /python-openstackclient/latest/contributor/plugins.html +/python-openstackclient/latest/cli/plugin-commands.html 301 /python-openstackclient/latest/cli/plugin-commands/index.html diff --git a/tox.ini b/tox.ini index a973b107f..addafa2bf 100644 --- a/tox.ini +++ b/tox.ini @@ -118,6 +118,8 @@ deps = commands = sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html sphinx-build -a -E -W -d doc/build/doctrees -b man doc/source doc/build/man + # Validate redirects (must be done after the docs build + whereto doc/build/html/.htaccess doc/test/redirect-tests.txt [testenv:releasenotes] basepython = python3