Skip to content

Commit ba0f39d

Browse files
Fix Polarion test case ID matching in modifyE2ETags.py
jump.py builds the Polarion match key as "classname.name" and queries Polarion for entries matching those IDs. The XML produced by modifyE2ETags.py had classname="no-testclass" (Ginkgo's default, never overwritten) and an "OTP." prefix in the name (from the [OTP] tag). This produced IDs like "no-testclass.OTP.sig-installer.Suite_openshift_openstack..." which matched nothing in Polarion. The empty query result caused process_xml() to raise JumpException("Cannot proceed without xml with tempest results"). Strip the "OTP." prefix and split the formatted name at the first dot — first segment becomes classname, rest becomes name. This produces classname="sig-installer" and name="Suite_openshift_ openstack.<category>.<description>", matching the 21 registered automation-test-ids (RHOSO-11212 through RHOSO-11266). Validated on serval70 with jump.py --dry_run=True (no --no-mapping). Tests matched correctly against Polarion entries. Related-Issue: OSPRH-32990 Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent fbc3536 commit ba0f39d

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,14 @@ def format_test_case_name(s):
4949
ts.remove(tc)
5050
else:
5151
new_tc_name = format_test_case_name(tc_name)
52-
tc.set('name', new_tc_name)
52+
if new_tc_name.startswith('OTP.'):
53+
new_tc_name = new_tc_name[4:]
54+
if '.' in new_tc_name:
55+
tc_classname, tc_name_rest = new_tc_name.split('.', 1)
56+
tc.set('classname', tc_classname)
57+
tc.set('name', tc_name_rest)
58+
else:
59+
tc.set('name', new_tc_name)
5360
print('TestCase added to output XML:', new_tc_name)
5461
ts.set('tests', str(len(ts.getchildren())))
5562

0 commit comments

Comments
 (0)