From d2d67ae3a1e7f4e482adf6b2e050f81cf57ec9e7 Mon Sep 17 00:00:00 2001 From: Brian Rosmaita Date: Tue, 12 Nov 2019 19:30:46 -0500 Subject: [PATCH] Install requirements during the correct tox phase Glance isn't explicitly installing requirements, so add requirements as tox deps in such a way that they'll be properly constrained by the current openstack upper-constraints. This change also bumps the version of psycopg to that of the current upper-constraints in test-requirements and lower-constraints. (The version in our current lower-constraints is subject to the "could not determine PostgreSQL version from '10.x'" error, which causes the lower-constraints job to fail.) Change-Id: I1bb5759e6b1e3f8545ab417617072a61323b59a7 Closes-bug: #1852356 --- lower-constraints.txt | 2 +- test-requirements.txt | 2 +- tox.ini | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lower-constraints.txt b/lower-constraints.txt index 35a58c225a..d55616b043 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -87,7 +87,7 @@ pika-pool==0.1.3 pika==0.10.0 prettytable==0.7.1 psutil==3.2.2 -psycopg2==2.6.2 +psycopg2==2.8.4 pycadf==2.7.0 pycparser==2.18 pyflakes==0.8.1 diff --git a/test-requirements.txt b/test-requirements.txt index 181828d6bd..d064ee1bed 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -27,7 +27,7 @@ doc8>=0.6.0 # Apache-2.0 # Optional packages that should be installed when testing PyMySQL>=0.7.6 # MIT License -psycopg2>=2.6.2 # LGPL/ZPL +psycopg2>=2.8.4 # LGPL/ZPL pysendfile>=2.0.0;sys_platform!='win32' # MIT xattr>=0.9.2;sys_platform!='win32' # MIT python-swiftclient>=3.2.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index c7580272e9..5ba8fd37fd 100644 --- a/tox.ini +++ b/tox.ini @@ -18,8 +18,10 @@ setenv = # clue for oslo.db to use file-based database. OS_TEST_DBAPI_ADMIN_CONNECTION=sqlite:////tmp/placeholder-never-created-nor-used.db usedevelop = True -install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages} -deps = -r{toxinidir}/test-requirements.txt +install_command = pip install {opts} {packages} +deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/test-requirements.txt + -r{toxinidir}/requirements.txt commands = find . -type f -name "*.pyc" -delete whitelist_externals = bash