Project

General

Profile

Bug #48152

mgr_test_case: skipTest is an instance method, not a class method

Added by Rishabh Dave over 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
octopus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

When the block calling skipTest() (as class method) is executed, following traceback can be found -

2020-11-09 18:24:29,193.193 INFO:__main__:======================================================================
2020-11-09 18:24:29,193.193 INFO:__main__:ERROR: setUpClass (tasks.mgr.test_dashboard.TestDashboard)
2020-11-09 18:24:29,193.193 INFO:__main__:----------------------------------------------------------------------
2020-11-09 18:24:29,193.193 INFO:__main__:Traceback (most recent call last):
2020-11-09 18:24:29,193.193 INFO:__main__:  File "/home/rishabh/repos/ceph/minor/qa/tasks/mgr/mgr_test_case.py", line 102, in setUpClass
2020-11-09 18:24:29,193.193 INFO:__main__:    if len(cls.mgr_cluster.mgr_ids) < cls.MGRS_REQUIRED:
2020-11-09 18:24:29,193.193 INFO:__main__:TypeError: skipTest() missing 1 required positional argument: 'reason'

unittest.TestCase.skipTest() is an instance method and not a class method. So the "reason" provided as str ends up being accepted as the instance and therefore, the call is short of one parameter.


Related issues

Copied to mgr - Backport #48279: octopus: mgr_test_case: skipTest is an instance method, not a class method Resolved

History

#1 Updated by Rishabh Dave over 3 years ago

  • Status changed from Fix Under Review to Resolved

#2 Updated by Rishabh Dave over 3 years ago

  • Status changed from Resolved to Fix Under Review

#3 Updated by Rishabh Dave over 3 years ago

  • Status changed from Fix Under Review to Pending Backport

Since Kefu recommends creating backports - https://github.com/ceph/ceph/pull/37992#issuecomment-729690559.

#4 Updated by Rishabh Dave over 3 years ago

  • Backport set to octopus

#5 Updated by Rishabh Dave over 3 years ago

  • Copied to Backport #48279: octopus: mgr_test_case: skipTest is an instance method, not a class method added

#6 Updated by Nathan Cutler about 3 years ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Also available in: Atom PDF