Fix mitaka unit tests
There are a couple of issues here. First, we have an uncapped openstackclient dependency, which means we are now pulling in a too-new version of osc without the utils module. The solution to this is to start using upper-constraints, but that brings us to problem two. Problem two is that we had some requirements that pointed directly at git repos in mitaka, which is incompatible with upper-constraints. To fix this, we can now use the released versions of these deps. os-cloud-config is in global-requirements without a version specified, and tripleo-common is added as a dependency of this patch. Change-Id: I1c219a3547ca48e5c4a649441632eabc326081f9 Closes-Bug: 1656871
This commit is contained in:
parent
a145324838
commit
105df7b2a2
|
@ -14,8 +14,5 @@ python-ironicclient>=1.1.0 # Apache-2.0
|
|||
python-openstackclient>=2.1.0 # Apache-2.0
|
||||
six>=1.9.0 # MIT
|
||||
|
||||
# tripleo-common lib is not yet on PyPi
|
||||
-e git://github.com/openstack/tripleo-common.git#egg=tripleo_common
|
||||
|
||||
# This currently needs a development version of os_cloud_config
|
||||
-e git://github.com/openstack/os-cloud-config.git#egg=os_cloud_config
|
||||
tripleo-common>=2.0.0,<3.0.0 # Apache-2.0
|
||||
os-cloud-config # Apache-2.0
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Client constraint file contains this client version pin that is in conflict
|
||||
# with installing the client from source. We should remove the version pin in
|
||||
# the constraints file before applying it for from-source installation.
|
||||
|
||||
CONSTRAINTS_FILE="$1"
|
||||
shift 1
|
||||
|
||||
set -e
|
||||
|
||||
# NOTE(tonyb): Place this in the tox enviroment's log dir so it will get
|
||||
# published to logs.openstack.org for easy debugging.
|
||||
localfile="$VIRTUAL_ENV/log/upper-constraints.txt"
|
||||
|
||||
if [[ "$CONSTRAINTS_FILE" != http* ]]; then
|
||||
CONSTRAINTS_FILE="file://$CONSTRAINTS_FILE"
|
||||
fi
|
||||
# NOTE(tonyb): need to add curl to bindep.txt if the project supports bindep
|
||||
curl "$CONSTRAINTS_FILE" --insecure --progress-bar --output "$localfile"
|
||||
|
||||
pip install -c"$localfile" openstack-requirements
|
||||
|
||||
# This is the main purpose of the script: Allow local installation of
|
||||
# the current repo. It is listed in constraints file and thus any
|
||||
# install will be constrained and we need to unconstrain it.
|
||||
edit-constraints "$localfile" -- "$CLIENT_NAME"
|
||||
|
||||
pip install -c"$localfile" -U "$@"
|
||||
exit $?
|
3
tox.ini
3
tox.ini
|
@ -5,12 +5,13 @@ skipsdist = True
|
|||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
install_command = pip install -U {opts} {packages}
|
||||
install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/mitaka} {opts} {packages}
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
LANG=en_US.UTF-8
|
||||
LANGUAGE=en_US:en
|
||||
LC_ALL=C
|
||||
CLIENT_NAME=python-tripleoclient
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands = python setup.py testr --slowest --testr-args='{posargs}'
|
||||
|
|
Loading…
Reference in New Issue