summaryrefslogtreecommitdiffstats
path: root/tests/functional/snapshot/test_snap_delete_snap_of_volume.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/snapshot/test_snap_delete_snap_of_volume.py')
-rw-r--r--tests/functional/snapshot/test_snap_delete_snap_of_volume.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/functional/snapshot/test_snap_delete_snap_of_volume.py b/tests/functional/snapshot/test_snap_delete_snap_of_volume.py
index fdac20047..afea29379 100644
--- a/tests/functional/snapshot/test_snap_delete_snap_of_volume.py
+++ b/tests/functional/snapshot/test_snap_delete_snap_of_volume.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
@@ -37,7 +37,7 @@ class SnapshotDeleteSnapVolume(GlusterBaseClass):
def setUp(self):
# SettingUp volume and Mounting the volume
- GlusterBaseClass.setUp.im_func(self)
+ self.get_super_method(self, 'setUp')()
ret = self.setup_volume_and_mount_volume(mounts=self.mounts)
if not ret:
raise ExecutionError("Failed to setup volume %s" % self.volname)
@@ -45,7 +45,13 @@ class SnapshotDeleteSnapVolume(GlusterBaseClass):
def tearDown(self):
# Calling GlusterBaseClass tearDown
- GlusterBaseClass.tearDown.im_func(self)
+ self.get_super_method(self, 'tearDown')()
+
+ # delete all snapshot created
+ g.log.info("Deleting all snapshots created")
+ ret, _, _ = snap_delete_all(self.mnode)
+ self.assertEqual(ret, 0, "Failed to delete snapshots")
+ g.log.info("All Snapshots deleted successfully")
# Unmount and cleanup-volume
g.log.info("Unmount and cleanup-volume")
@@ -102,9 +108,3 @@ class SnapshotDeleteSnapVolume(GlusterBaseClass):
"%s" % (self.snap1, self.volname)))
g.log.info("Snapshot %s created successfully"
" for volume %s", self.snap1, self.volname)
-
- # delete all snapshot created
- g.log.info("Deleting all snapshots created")
- ret, _, _ = snap_delete_all(self.mnode)
- self.assertEqual(ret, 0, "Failed to delete snapshots")
- g.log.info("All Snapshots deleted successfully")