Add bindep.txt to fix unit tests

The unit tests fail since no mysqladmin command is installed. Add
bindep.txt to install the needed binaries in our CI environment.

Add also the usual bindep tox environment for developers.

Change-Id: If951f82d6610c6ee54d594d9a8985bc78e135d2b
This commit is contained in:
Pierre Riteau 2019-07-02 10:32:10 +01:00
parent 5d5beba1b4
commit 64a1d26aaf
2 changed files with 19 additions and 0 deletions

8
bindep.txt Normal file
View File

@ -0,0 +1,8 @@
# This is a cross-platform list tracking distribution packages needed by tests;
# see http://docs.openstack.org/infra/bindep/ for additional information.
mysql-client [platform:dpkg]
mysql-server [platform:dpkg]
postgresql
postgresql-client [platform:dpkg]
postgresql-server [platform:rpm]

11
tox.ini
View File

@ -81,3 +81,14 @@ deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
# This environment can be used to quickly validate that all needed system
# packages required to successfully execute test targets are installed
[testenv:bindep]
basepython = python3
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files.
deps = bindep
commands = bindep test