summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLuis Pabon <lpabon@redhat.com>2013-08-28 15:08:14 -0400
committerPeter Portante <pportant@redhat.com>2013-08-28 19:01:50 -0700
commit3861bcec945ede062fccd5a94ccc86a6bfc8e280 (patch)
treebb7f5114f37899fac3d644bfc50b0b1a7edbe12a /test
parent9d4e67e741f13b4b93620fbb972886e1dc975fee (diff)
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>
Diffstat (limited to 'test')
-rw-r--r--test/unit/common/test_utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/unit/common/test_utils.py b/test/unit/common/test_utils.py
index 4aae4c3..9ac684a 100644
--- a/test/unit/common/test_utils.py
+++ b/test/unit/common/test_utils.py
@@ -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)