Skip to content

Commit 4844ebf

Browse files
Fix Polarion test case matching in modifyE2ETags.py
The Polarion jump.py tool builds test case IDs as "classname.name" for matching against registered automation test IDs. Our XML had classname="no-testclass" (from Ginkgo's SuiteDescription) and an "OTP." prefix in the test name (from the [OTP] tag in openshift-tests output). This produced IDs like "no-testclass.OTP.sig-installer.Suite_openshift_openstack..." which don't match the registered Polarion entries (sig-installer.Suite_openshift_openstack...). Clear the classname attribute and strip the OTP prefix so the resulting ID matches the automation-test-id format in the RHOSO Polarion project (RHOSO-11212 through RHOSO-11266). Related-Issue: OSPRH-32990 Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent fbc3536 commit 4844ebf

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

collection/tools/roles/tools_openshift_tests/scripts/modifyE2ETags.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ def format_test_case_name(s):
4949
ts.remove(tc)
5050
else:
5151
new_tc_name = format_test_case_name(tc_name)
52+
if new_tc_name.startswith('OTP.'):
53+
new_tc_name = new_tc_name[4:]
5254
tc.set('name', new_tc_name)
55+
tc.set('classname', '')
5356
print('TestCase added to output XML:', new_tc_name)
5457
ts.set('tests', str(len(ts.getchildren())))
5558

0 commit comments

Comments
 (0)