From 736e31c5d1dc1106fa0cced36ea5f43b691c7689 Mon Sep 17 00:00:00 2001 From: Sri Vignesh Date: Tue, 12 May 2020 12:58:26 +0530 Subject: [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 --- .../snapshot/test_validate_snaps_dir_over_uss.py | 23 +++++++--------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'tests/functional/snapshot/test_validate_snaps_dir_over_uss.py') diff --git a/tests/functional/snapshot/test_validate_snaps_dir_over_uss.py b/tests/functional/snapshot/test_validate_snaps_dir_over_uss.py index 705abe31b..c1e42517f 100644 --- a/tests/functional/snapshot/test_validate_snaps_dir_over_uss.py +++ b/tests/functional/snapshot/test_validate_snaps_dir_over_uss.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2020 Red Hat, Inc. +# Copyright (C) 2017-2020 Red Hat, Inc. # # 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 @@ -89,23 +89,14 @@ class TestValidateUss(GlusterBaseClass): g.log.info("Successfully disabled uss for volume" "%s", self.volname) - # Calling GlusterBaseClass tearDown - self.get_super_method(self, 'tearDown')() - - @classmethod - def tearDownClass(cls): - """ - Clean up the volume & mount - """ - # stopping the volume and clean up the volume - g.log.info("Starting to Cleanup Volume") - 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("Successful in Cleanup Volume and mount") + raise ExecutionError("Failed to Unmount and Cleanup Volume") + g.log.info("Successful in Unmount Volume and Cleanup Volume") - # calling GlusterBaseClass tearDownClass - cls.get_super_method(cls, 'tearDownClass')() + # Calling GlusterBaseClass tearDown + self.get_super_method(self, 'tearDown')() def test_validate_snaps_dir_over_uss(self): -- cgit