From 64102655746ce2ad0d5f8a40fe4fda9561b5c7ae Mon Sep 17 00:00:00 2001 From: Jamie Lennox Date: Thu, 14 Apr 2016 11:35:12 +1000 Subject: [PATCH] Update requirements ordering When using generated version output strings these produce stable but unusually ordered outputs. Fudge the tests to create the expected version strings to ease the update process. Change-Id: I021f2befe2422525f528e27b041f60ec684e1eae --- .../tests/files/gr-base.txt | 6 +++--- openstack_requirements/tests/test_update.py | 20 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/openstack_requirements/tests/files/gr-base.txt b/openstack_requirements/tests/files/gr-base.txt index 858b63c987..aeea4a1e3d 100644 --- a/openstack_requirements/tests/files/gr-base.txt +++ b/openstack_requirements/tests/files/gr-base.txt @@ -21,7 +21,7 @@ httplib2 iso8601>=0.1.4 Jinja2 jsonrpclib -jsonschema>=1.0.0,!=1.4.0,<2 +jsonschema!=1.4.0,<2,>=1.0.0 kazoo>=0.9,<=1.1 lesscpy>=0.9h kombu>=2.4.8 @@ -71,12 +71,12 @@ setuptools_git>=0.4 simplejson>=2.2.0 six sockjs-tornado>=1.0.0,<2.0.0 -SQLAlchemy>=0.7,<=0.7.99 +SQLAlchemy<=0.7.99,>=0.7 sqlalchemy-migrate>=0.7 stevedore>=0.10 suds>=0.4 warlock>=0.7.0,<2 -WebOb>=1.2.3,<1.3 +WebOb<1.3,>=1.2.3 websockify>=0.5.1,<0.6 wsgiref>=0.1.2 WSME>=0.5b2 diff --git a/openstack_requirements/tests/test_update.py b/openstack_requirements/tests/test_update.py index 67b965d863..b2ad48f90c 100644 --- a/openstack_requirements/tests/test_update.py +++ b/openstack_requirements/tests/test_update.py @@ -38,7 +38,7 @@ class SmokeTest(testtools.TestCase): global_env = self.useFixture(common.GlobalRequirements()) global_reqs = common._file_to_list(global_env.req_file) # This is testing our test input data. Perhaps remove? (lifeless) - self.assertIn("jsonschema>=1.0.0,!=1.4.0,<2", global_reqs) + self.assertIn("jsonschema!=1.4.0,<2,>=1.0.0", global_reqs) # And test the end to end call of update.py, UI and all. self.project = self.useFixture(common.project_fixture) capture = StringIO.StringIO() @@ -51,18 +51,18 @@ class SmokeTest(testtools.TestCase): expected = ('Version change for: greenlet, SQLAlchemy, eventlet, PasteDeploy, routes, WebOb, wsgiref, boto, kombu, pycrypto, python-swiftclient, lxml, jsonschema, python-keystoneclient\n' # noqa """Updated %(project)s/requirements.txt: greenlet>=0.3.1 -> greenlet>=0.3.2 - SQLAlchemy>=0.7.8,<=0.7.99 -> SQLAlchemy>=0.7,<=0.7.99 + SQLAlchemy>=0.7.8,<=0.7.99 -> SQLAlchemy<=0.7.99,>=0.7 eventlet>=0.9.12 -> eventlet>=0.12.0 PasteDeploy -> PasteDeploy>=1.5.0 routes -> Routes>=1.12.3 - WebOb>=1.2 -> WebOb>=1.2.3,<1.3 + WebOb>=1.2 -> WebOb<1.3,>=1.2.3 wsgiref -> wsgiref>=0.1.2 boto -> boto>=2.4.0 kombu>2.4.7 -> kombu>=2.4.8 pycrypto>=2.1.0alpha1 -> pycrypto>=2.6 python-swiftclient>=1.2,<2 -> python-swiftclient>=1.2 lxml -> lxml>=2.3 - jsonschema -> jsonschema>=1.0.0,!=1.4.0,<2 + jsonschema -> jsonschema!=1.4.0,<2,>=1.0.0 python-keystoneclient>=0.2.0 -> python-keystoneclient>=0.4.1 Version change for: mox, mox3, testrepository, testtools Updated %(project)s/test-requirements.txt: @@ -156,18 +156,18 @@ class UpdateTest(testtools.TestCase): expected = ('Version change for: greenlet, SQLAlchemy, eventlet, PasteDeploy, routes, WebOb, wsgiref, boto, kombu, pycrypto, python-swiftclient, lxml, jsonschema, python-keystoneclient\n' # noqa """Updated %(project)s/requirements.txt: greenlet>=0.3.1 -> greenlet>=0.3.2 - SQLAlchemy>=0.7.8,<=0.7.99 -> SQLAlchemy>=0.7,<=0.7.99 + SQLAlchemy>=0.7.8,<=0.7.99 -> SQLAlchemy<=0.7.99,>=0.7 eventlet>=0.9.12 -> eventlet>=0.12.0 PasteDeploy -> PasteDeploy>=1.5.0 routes -> Routes>=1.12.3 - WebOb>=1.2 -> WebOb>=1.2.3,<1.3 + WebOb>=1.2 -> WebOb<1.3,>=1.2.3 wsgiref -> wsgiref>=0.1.2 boto -> boto>=2.4.0 kombu>2.4.7 -> kombu>=2.4.8 pycrypto>=2.1.0alpha1 -> pycrypto>=2.6 python-swiftclient>=1.2,<2 -> python-swiftclient>=1.2 lxml -> lxml>=2.3 - jsonschema -> jsonschema>=1.0.0,!=1.4.0,<2 + jsonschema -> jsonschema!=1.4.0,<2,>=1.0.0 python-keystoneclient>=0.2.0 -> python-keystoneclient>=0.4.1 Version change for: mox, mox3, testrepository, testtools Updated %(project)s/test-requirements.txt: @@ -189,18 +189,18 @@ Updated %(project)s/test-requirements.txt: Version change for: greenlet, SQLAlchemy, eventlet, PasteDeploy, routes, WebOb, wsgiref, boto, kombu, pycrypto, python-swiftclient, lxml, jsonschema, python-keystoneclient\n""" # noqa """Updated %(project)s/requirements.txt: greenlet>=0.3.1 -> greenlet>=0.3.2 - SQLAlchemy>=0.7.8,<=0.7.99 -> SQLAlchemy>=0.7,<=0.7.99 + SQLAlchemy>=0.7.8,<=0.7.99 -> SQLAlchemy<=0.7.99,>=0.7 eventlet>=0.9.12 -> eventlet>=0.12.0 PasteDeploy -> PasteDeploy>=1.5.0 routes -> Routes>=1.12.3 - WebOb>=1.2 -> WebOb>=1.2.3,<1.3 + WebOb>=1.2 -> WebOb<1.3,>=1.2.3 wsgiref -> wsgiref>=0.1.2 boto -> boto>=2.4.0 kombu>2.4.7 -> kombu>=2.4.8 pycrypto>=2.1.0alpha1 -> pycrypto>=2.6 python-swiftclient>=1.2,<2 -> python-swiftclient>=1.2 lxml -> lxml>=2.3 - jsonschema -> jsonschema>=1.0.0,!=1.4.0,<2 + jsonschema -> jsonschema!=1.4.0,<2,>=1.0.0 python-keystoneclient>=0.2.0 -> python-keystoneclient>=0.4.1 Syncing %(project)s/test-requirements.txt Version change for: mox, mox3, testrepository, testtools