Add a dedicated "lpimport" tox testenv

To simplify the launchpadlib dependency installation for the
storyboard-migrate utility, use a separate tox testenv specifically
for this purpose and put that as its only additional runtime
requirement. Name the testenv "lpimport" with the expectation that
in time we may also rename the storyboard-migrate utility similarly
(so as to disambiguate it from the Alembic migrations we rely on
for database schema upgrades).

Change-Id: I8bd36bf69c235c8957ae4a161fd22cbe80028cf4
This commit is contained in:
Jeremy Stanley 2019-04-01 15:09:26 +00:00 committed by Monty Taylor
parent 605da70d6d
commit e386f32566
3 changed files with 10 additions and 4 deletions

View File

@ -79,7 +79,7 @@ Test Migration
You can do this with the following command::
tox -e venv -- storyboard-migrate
tox -e lpimport --
--config-file etc/storyboard.conf
--from-project $PROJECT_IN_LAUNCHPAD
--to-project $PROJECT_IN_STORYBOARD
@ -89,7 +89,7 @@ Test Migration
`$PROJECT_IN_STORYBOARD` should be replaced the name of the project
you are importing into in StoryBoard, for example `openstack/monasca`.
Two parameters of the `storyboard-migrate` command
Two parameters of the `storyboard-migrate` command used by `lpimport`
allows for filtering by the tags associated to the bug.
Both parameters accept a comma-separated lists of tags
and they are mutually exclusive.

View File

@ -29,6 +29,5 @@ apscheduler>=3.0.1,<3.1.0
python_dateutil>=2.4.0
oslo.concurrency>=3.8.0 # Apache-2.0
oslo.i18n>=2.1.0 # Apache-2.0
#launchpadlib # Only for migration
python-swiftclient
openstacksdk
openstacksdk

View File

@ -72,5 +72,12 @@ basepython = python3
deps = bindep
commands = bindep test
[testenv:lpimport]
basepython = python3
# The Launchpad bug import tool uses launchpadlib, which is not a typical
# runtime dependency of anything else in StoryBoard
deps = launchpadlib
commands = storyboard-migrate {posargs}
[hacking]
import_exceptions = storyboard._i18n