From: Rishabh Dave Date: Mon, 9 Nov 2020 11:02:39 +0000 (+0530) Subject: qa/mgr: mgr_test_case: raise SkipTest instead of calling skipTest() X-Git-Tag: v15.2.9~101^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=60f642abd78b09eddb199a275373ea5bff105b58;p=ceph.git qa/mgr: mgr_test_case: raise SkipTest instead of calling skipTest() skipTest() is being used as a class method which is not correct since it's an instance method. Replace call to skipTest() by a raising SkipTest instead. Fixes: https://tracker.ceph.com/issues/48152 Signed-off-by: Rishabh Dave (cherry picked from commit eb70274fa2c8d341585c21a274c91f9328c97a72) --- diff --git a/qa/tasks/mgr/mgr_test_case.py b/qa/tasks/mgr/mgr_test_case.py index 37baeb20e41f..8687b5f29002 100644 --- a/qa/tasks/mgr/mgr_test_case.py +++ b/qa/tasks/mgr/mgr_test_case.py @@ -1,6 +1,8 @@ import json import logging +from unittest import SkipTest + from teuthology import misc from tasks.ceph_test_case import CephTestCase @@ -99,7 +101,7 @@ class MgrTestCase(CephTestCase): assert cls.mgr_cluster is not None if len(cls.mgr_cluster.mgr_ids) < cls.MGRS_REQUIRED: - cls.skipTest( + raise SkipTest( "Only have {0} manager daemons, {1} are required".format( len(cls.mgr_cluster.mgr_ids), cls.MGRS_REQUIRED))