summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Riedemann <mriedem@us.ibm.com>2015-11-17 19:38:33 -0800
committerMatt Riedemann <mriedem@us.ibm.com>2015-11-20 01:58:25 +0000
commitd44a45acf224e106273ef3d8960abf37d1a9f5b2 (patch)
tree21acbd7d530c05e35417e8932da81a48be60295a
parentfcffd76cdfeb3a8ea17843ae7972e142c8031267 (diff)
downloadtrove-d44a45acf224e106273ef3d8960abf37d1a9f5b2.tar.gz
Stop using trunk python-troveclient in test runs
Because it has backward incompatible changes like: I5ab58fd64f4745a2e558392bff649b05401ed57a So the change here is to use the version of troveclient from stable/kilo global-requirements. We also sync up with global-requirements since (1) that's a thing that needs to happen anyway and (2) we need to cap mock to get the unit tests passing. Also fixes the remaining unit tests that are failing. Co-Authored-By: Craig Vyvial <cp16net@gmail.com> Change-Id: I465c787a65ec8cf9914c7133bd52ea8cf4741d61
-rw-r--r--requirements.txt48
-rw-r--r--setup.py1
-rw-r--r--test-requirements.txt18
-rw-r--r--trove/tests/unittests/guestagent/test_volume.py15
-rw-r--r--trove/tests/unittests/util/util.py7
5 files changed, 49 insertions, 40 deletions
diff --git a/requirements.txt b/requirements.txt
index 2175b404..3b4ab1f4 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,40 +1,40 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
-pbr>=0.6,!=0.7,<1.0
-SQLAlchemy>=0.9.7,<=0.9.99
-eventlet>=0.16.1,!=0.17.0
-keystonemiddleware>=1.5.0,<1.6.0
+pbr!=0.7,<1.0,>=0.6
+SQLAlchemy<=0.9.99,>=0.9.7
+eventlet!=0.17.0,>=0.16.1
+keystonemiddleware<1.6.0,>=1.5.0
kombu>=2.5.0
-Routes>=1.12.3,!=2.0
+Routes!=2.0,>=1.12.3
WebOb>=1.2.3
PasteDeploy>=1.5.0
Paste
-sqlalchemy-migrate>=0.9.5
+sqlalchemy-migrate!=0.9.8,<0.10.0,>=0.9.5
netaddr>=0.7.12
netifaces>=0.10.4
httplib2>=0.7.5
lxml>=2.3
passlib
-python-heatclient>=0.3.0,<0.5.0
-python-novaclient>=2.22.0,<2.24.0
-python-cinderclient>=1.1.0,<1.2.0
-python-keystoneclient>=1.1.0,<1.4.0
-python-swiftclient>=2.2.0,<2.5.0
-python-designateclient>=1.0.0,<1.2.0
-python-neutronclient>=2.3.11,<2.5.0
+python-heatclient<0.5.0,>=0.3.0
+python-novaclient<2.24.0,>=2.22.0
+python-cinderclient<1.2.0,>=1.1.0
+python-keystoneclient<1.4.0,>=1.2.0
+python-swiftclient<2.5.0,>=2.2.0
+python-designateclient<1.2.0,>=1.0.0
+python-neutronclient<2.5.0,>=2.4.0
iso8601>=0.1.9
-jsonschema>=2.0.0,<3.0.0
-Jinja2>=2.6 # BSD License (3 clause)
-pexpect>=3.1,!=3.3 # ISC License
-oslo.config>=1.9.3,<1.10.0 # Apache-2.0
-oslo.i18n>=1.5.0,<1.6.0 # Apache-2.0
-oslo.serialization>=1.4.0,<1.5.0 # Apache-2.0
-oslo.utils>=1.4.0,<1.5.0 # Apache-2.0
-oslo.concurrency>=1.8.0,<1.9.0 # Apache-2.0
+jsonschema<3.0.0,>=2.0.0
+Jinja2>=2.6 # BSD License (3 clause)
+pexpect!=3.3,>=3.1 # ISC License
+oslo.config<1.10.0,>=1.9.3 # Apache-2.0
+oslo.i18n<1.6.0,>=1.5.0 # Apache-2.0
+oslo.serialization<1.5.0,>=1.4.0 # Apache-2.0
+oslo.utils!=1.4.1,<1.5.0,>=1.4.0 # Apache-2.0
+oslo.concurrency<1.9.0,>=1.8.2 # Apache-2.0
MySQL-python
Babel>=1.3
six>=1.9.0
-stevedore>=1.3.0,<1.4.0 # Apache-2.0
-oslo.messaging>=1.8.0,<1.9.0 # Apache-2.0
-osprofiler>=0.3.0 # Apache-2.0
+stevedore<1.4.0,>=1.3.0 # Apache-2.0
+oslo.messaging<1.9.0,>=1.8.0 # Apache-2.0
+osprofiler>=0.3.0 # Apache-2.0
diff --git a/setup.py b/setup.py
index 73637574..056c16c2 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/test-requirements.txt b/test-requirements.txt
index 465f36a4..5e94f23c 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -2,22 +2,22 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
# Hacking already pins down pep8, pyflakes and flake8
-hacking>=0.8.0,<0.9
-sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
-oslosphinx>=2.5.0,<2.6.0 # Apache-2.0
+hacking<0.9,>=0.8.0
+sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2
+oslosphinx<2.6.0,>=2.5.0 # Apache-2.0
coverage>=3.6
nose
nosexcover
openstack-doc-tools>=0.23
-openstack.nose_plugin>=0.7
+openstack.nose-plugin>=0.7
WebTest>=2.0
-wsgi_intercept>=0.6.1 # MIT License
+wsgi-intercept>=0.6.1 # MIT License
proboscis==1.2.5.3
-http://tarballs.openstack.org/python-troveclient/python-troveclient-master.tar.gz#egg=python-troveclient
-mock>=1.0
-mox3>=0.7.0
-testtools>=0.9.36,!=1.2.0
+python-troveclient<1.1.0,>=1.0.7
+mock<1.1.0,>=1.0
+mox3<0.8.0,>=0.7.0
+testtools!=1.2.0,>=0.9.36
discover
testrepository>=0.0.18
diff --git a/trove/tests/unittests/guestagent/test_volume.py b/trove/tests/unittests/guestagent/test_volume.py
index cd031cc4..31595e2d 100644
--- a/trove/tests/unittests/guestagent/test_volume.py
+++ b/trove/tests/unittests/guestagent/test_volume.py
@@ -127,9 +127,11 @@ class VolumeDeviceTest(testtools.TestCase):
os.path.exists = origin_os_path_exists
utils.execute = origin_execute
+ @patch.object(pexpect, 'spawn', Mock())
def test_unmount_positive(self):
self._test_unmount()
+ @patch.object(pexpect, 'spawn', Mock())
def test_unmount_negative(self):
self._test_unmount(False)
@@ -168,18 +170,19 @@ class VolumeMountPointTest(testtools.TestCase):
def tearDown(self):
super(VolumeMountPointTest, self).tearDown()
+ @patch.object(pexpect, 'spawn', Mock())
+ @patch.object(utils, 'execute', Mock())
def test_mount(self):
origin_ = os.path.exists
os.path.exists = MagicMock(return_value=False)
fake_spawn = _setUp_fake_spawn()
- utils.execute = Mock()
-
- self.volumeMountPoint.mount()
+ with patch.object(utils, 'execute_with_timeout'):
+ self.volumeMountPoint.mount()
- self.assertEqual(1, os.path.exists.call_count)
- self.assertEqual(1, utils.execute.call_count)
- self.assertEqual(1, fake_spawn.expect.call_count)
+ self.assertEqual(1, os.path.exists.call_count)
+ self.assertEqual(1, utils.execute.call_count)
+ self.assertEqual(1, fake_spawn.expect.call_count)
os.path.exists = origin_
diff --git a/trove/tests/unittests/util/util.py b/trove/tests/unittests/util/util.py
index 2f9b6893..1f6e69a9 100644
--- a/trove/tests/unittests/util/util.py
+++ b/trove/tests/unittests/util/util.py
@@ -13,7 +13,13 @@
# under the License.
+DB_SETUP = None
+
+
def init_db():
+ global DB_SETUP
+ if DB_SETUP:
+ return
from trove.common import cfg
from trove.db import get_db_api
from trove.db.sqlalchemy import session
@@ -21,3 +27,4 @@ def init_db():
db_api = get_db_api()
db_api.db_sync(CONF)
session.configure_db(CONF)
+ DB_SETUP = True