summaryrefslogtreecommitdiffstats
path: root/tests/functional/dht/test_verify_create_hash.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/dht/test_verify_create_hash.py')
-rw-r--r--tests/functional/dht/test_verify_create_hash.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/functional/dht/test_verify_create_hash.py b/tests/functional/dht/test_verify_create_hash.py
index 23e935392..5ed2a97a0 100644
--- a/tests/functional/dht/test_verify_create_hash.py
+++ b/tests/functional/dht/test_verify_create_hash.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2017-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@ class TestCreateFile(GlusterBaseClass):
"""
Setup and mount volume or raise ExecutionError
"""
- GlusterBaseClass.setUp.im_func(self)
+ self.get_super_method(self, 'setUp')()
# Setup Volume
ret = self.setup_volume_and_mount_volume(self.mounts)
@@ -104,7 +104,7 @@ class TestCreateFile(GlusterBaseClass):
for brickdir in brickobject:
count += 1
ret = brickdir.hashrange_contains_hash(filehash)
- if ret == 1:
+ if ret:
hash_subvol = subvols[count]
ret, _, err = g.run(brickdir._host, ("stat %s/file1" %
brickdir._fqpath))
@@ -153,14 +153,14 @@ class TestCreateFile(GlusterBaseClass):
ret, _, _ = g.run(self.clients[0], ("touch %s" % file_one))
self.assertTrue(ret, "Expected file creation to fail")
- @classmethod
- def tearDownClass(cls):
- # Unmount Volume and Cleanup Volume
+ def tearDown(self):
+
+ # Unmount and cleanup original volume
g.log.info("Starting to Unmount Volume and Cleanup Volume")
- ret = cls.unmount_volume_and_cleanup_volume(mounts=cls.mounts)
+ ret = self.unmount_volume_and_cleanup_volume(mounts=self.mounts)
if not ret:
- raise ExecutionError("Failed to Unmount Volume and Cleanup Volume")
- g.log.info("Successful in Unmount Volume and Cleanup Volume")
+ raise ExecutionError("Failed to umount the vol & cleanup Volume")
+ g.log.info("Successful in umounting the volume and Cleanup")
# Calling GlusterBaseClass tearDown
- GlusterBaseClass.tearDownClass.im_func(cls)
+ self.get_super_method(self, 'tearDown')()