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 <ridave@redhat.com>
This commit is contained in:
Rishabh Dave 2020-11-09 16:32:39 +05:30
parent c5f8bb268e
commit eb70274fa2

View File

@ -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))