Depend only on OpenStack Swift 1.9.1

* The master branch is currently tracking the development
version 1.9.1 of Havana OpenStack Swift.

* Seems that we still have some settings which are not
reset in the unit tests.  This fix provides a guaranteed
state for test_utils.py:TestUtils.test_get_container_details

Change-Id: Ie32f49743301bfa493f70ed8a539fb6840f9f67b
Signed-off-by: Luis Pabon <lpabon@redhat.com>
Reviewed-on: http://review.gluster.org/5719
Reviewed-by: Peter Portante <pportant@redhat.com>
Tested-by: Peter Portante <pportant@redhat.com>
This commit is contained in:
Luis Pabon 2013-08-28 15:08:14 -04:00 committed by Peter Portante
parent 9d4e67e741
commit 3861bcec94
3 changed files with 17 additions and 5 deletions

View File

@ -135,6 +135,14 @@ one or more tests be added to the automated unit test suite. Unit
tests are available under the `test/unit` directory.
#### Functional Tests
##### OpenStack Swift Havana Setup
Currently, Havana OpenStack Swift is still under development. While
currently there is no official release for Havana Swift, there is a
yum repo with multiple Havana Swift RPM development releases available.
Please refer to the following [README][] file for more information.
##### Executing the tests
The automated functional tests only run on RPM based systems
like Fedora/CentOS, etc. To run the functional tests, the following
requirements must be met.
@ -235,3 +243,4 @@ of the RPM:
[PEP8]: http://www.python.org/dev/peps/pep-0008
[Git Commit Messages]: https://wiki.openstack.org/wiki/GitCommitMessages
[GlusterFS Compiling RPMS]: https://forge.gluster.org/glusterfs-core/pages/CompilingRPMS
[README]: http://repos.fedorapeople.org/repos/openstack/openstack-trunk/README

View File

@ -39,11 +39,11 @@ BuildRequires: python-setuptools
Requires : memcached
Requires : openssl
Requires : python
Requires : openstack-swift >= 1.9.1
Requires : openstack-swift-account >= 1.9.1
Requires : openstack-swift-container >= 1.9.1
Requires : openstack-swift-object >= 1.9.1
Requires : openstack-swift-proxy >= 1.9.1
Requires : openstack-swift = 1.9.1
Requires : openstack-swift-account = 1.9.1
Requires : openstack-swift-container = 1.9.1
Requires : openstack-swift-object = 1.9.1
Requires : openstack-swift-proxy = 1.9.1
Obsoletes: glusterfs-swift-plugin
Obsoletes: glusterfs-swift
Obsoletes: glusterfs-ufo

View File

@ -587,8 +587,10 @@ class TestUtils(unittest.TestCase):
def test_get_container_details(self):
orig_cwd = os.getcwd()
__do_getsize = Glusterfs._do_getsize
td = tempfile.mkdtemp()
try:
Glusterfs._do_getsize = False
tf = tarfile.open("common/data/container_tree.tar.bz2", "r:bz2")
os.chdir(td)
tf.extractall()
@ -610,6 +612,7 @@ class TestUtils(unittest.TestCase):
full_dir3: os.path.getmtime(full_dir3),
}
finally:
Glusterfs._do_getsize = __do_getsize
os.chdir(orig_cwd)
shutil.rmtree(td)