summaryrefslogtreecommitdiffstats
path: root/tests/functional/snapshot/test_snapshot_restore.py
diff options
context:
space:
mode:
authorSri Vignesh <sselvan@redhat.com>2020-05-12 12:58:26 +0530
committerBala Konda Reddy M <bala12352@gmail.com>2020-05-15 13:47:51 +0000
commit736e31c5d1dc1106fa0cced36ea5f43b691c7689 (patch)
tree6aa5b2dafeae47231a9c15cddb5dc7e8f2bffbc1 /tests/functional/snapshot/test_snapshot_restore.py
parent2d1b8392fe626684c86fae06b93cf8acd308d105 (diff)
[Testfix] Move test from teardown class to teardown
Move cases from teardown class to teardown in snapshot Change-Id: I7b33fa2728665fad000a5ad881f6690d40913f22 Signed-off-by: Sri Vignesh <sselvan@redhat.com>
Diffstat (limited to 'tests/functional/snapshot/test_snapshot_restore.py')
-rw-r--r--tests/functional/snapshot/test_snapshot_restore.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/tests/functional/snapshot/test_snapshot_restore.py b/tests/functional/snapshot/test_snapshot_restore.py
index 1e84c800f..99a82e2b7 100644
--- a/tests/functional/snapshot/test_snapshot_restore.py
+++ b/tests/functional/snapshot/test_snapshot_restore.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2020 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2016-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
@@ -95,20 +95,14 @@ class SnapRestore(GlusterBaseClass):
ret, _, _ = snap_delete_all(self.mnode)
if not ret:
raise ExecutionError("Snapshot delete failed.")
- self.get_super_method(self, 'tearDown')()
- @classmethod
- def tearDownClass(cls):
- """
- Clean up the volume & mount
- """
- g.log.info("Starting volume and mount cleanup")
- ret = cls.unmount_volume_and_cleanup_volume(cls.mounts)
+ # Unmount and cleanup-volume
+ ret = self.unmount_volume_and_cleanup_volume(mounts=self.mounts)
if not ret:
- raise ExecutionError("Failed to cleanup volume and mount")
- g.log.info("Cleanup successful for the volume and mount")
+ raise ExecutionError("Failed to Unmount and Cleanup Volume")
+ g.log.info("Successful in Unmount Volume and Cleanup Volume")
- cls.get_super_method(cls, 'tearDownClass')()
+ self.get_super_method(self, 'tearDown')()
def test_validate_snaps_restore(self):
# pylint: disable=too-many-statements