Skip to content

Commit 6f07828

Browse files
author
Eric Fried
committed
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
1 parent c6266b5 commit 6f07828

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

doc/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ sphinx!=1.6.6,!=1.6.7,>=1.6.5,<2.0.0;python_version=='2.7' # BSD
77
sphinx!=1.6.6,!=1.6.7,>=1.6.5;python_version>='3.4' # BSD
88
sphinxcontrib-apidoc>=0.2.0 # BSD
99

10+
# redirect tests in docs
11+
whereto>=0.4.0 # Apache-2.0
12+
1013
# Install these to generate sphinx autodocs
1114
aodhclient>=0.9.0 # Apache-2.0
1215
gnocchiclient>=3.3.1 # Apache-2.0

doc/test/redirect-tests.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/python-openstackclient/latest/command-objects/this-is-a-test.html 301 /python-openstackclient/latest/cli/command-objects/this-is-a-test.html
2+
/python-openstackclient/latest/authentication.html 301 /python-openstackclient/latest/cli/authentication.html
3+
/python-openstackclient/latest/backward-incompatible.html 301 /python-openstackclient/latest/cli/backward-incompatible.html
4+
/python-openstackclient/latest/command-list.html 301 /python-openstackclient/latest/cli/command-list.html
5+
/python-openstackclient/latest/commands.html 301 /python-openstackclient/latest/cli/commands.html
6+
/python-openstackclient/latest/decoder.html 301 /python-openstackclient/latest/cli/decoder.html
7+
/python-openstackclient/latest/interactive.html 301 /python-openstackclient/latest/cli/interactive.html
8+
/python-openstackclient/latest/plugin-commands.html 301 /python-openstackclient/latest/cli/plugin-commands.html
9+
/python-openstackclient/latest/specs/this-is-a-test.html 301 /python-openstackclient/latest/contributor/specs/this-is-a-test.html
10+
/python-openstackclient/latest/command-beta.html 301 /python-openstackclient/latest/contributor/command-beta.html
11+
/python-openstackclient/latest/command-errors.html 301 /python-openstackclient/latest/contributor/command-errors.html
12+
/python-openstackclient/latest/command-logs.html 301 /python-openstackclient/latest/contributor/command-logs.html
13+
/python-openstackclient/latest/command-options.html 301 /python-openstackclient/latest/contributor/command-options.html
14+
/python-openstackclient/latest/command-wrappers.html 301 /python-openstackclient/latest/contributor/command-wrappers.html
15+
/python-openstackclient/latest/developing.html 301 /python-openstackclient/latest/contributor/developing.html
16+
/python-openstackclient/latest/humaninterfaceguide.html 301 /python-openstackclient/latest/contributor/humaninterfaceguide.html
17+
/python-openstackclient/latest/plugins.html 301 /python-openstackclient/latest/contributor/plugins.html
18+
/python-openstackclient/latest/cli/plugin-commands.html 301 /python-openstackclient/latest/cli/plugin-commands/index.html

tox.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ deps =
118118
commands =
119119
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
120120
sphinx-build -a -E -W -d doc/build/doctrees -b man doc/source doc/build/man
121+
# Validate redirects (must be done after the docs build
122+
whereto doc/build/html/.htaccess doc/test/redirect-tests.txt
121123

122124
[testenv:releasenotes]
123125
basepython = python3

0 commit comments

Comments
 (0)