summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Fried <openstack@fried.cc>2019-11-04 17:42:57 -0600
committerEric Fried <openstack@fried.cc>2019-11-05 07:09:05 -0600
commit6f07828bf044e5eda53037e986d9ae642ee499af (patch)
treef6f1365778f0118e79eba0bbd80f14484299556c
parentc6266b5ab22b911ae7e0ca5077d0c04a23dabca9 (diff)
downloadpython-openstackclient-6f07828bf044e5eda53037e986d9ae642ee499af.tar.gz
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
-rw-r--r--doc/requirements.txt3
-rw-r--r--doc/test/redirect-tests.txt18
-rw-r--r--tox.ini2
3 files changed, 23 insertions, 0 deletions
diff --git a/doc/requirements.txt b/doc/requirements.txt
index ec692e75..8639f936 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 00000000..9473d692
--- /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 a973b107..addafa2b 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