Commit d686811 1 parent b2eb7d2 commit d686811 Copy full SHA for d686811
File tree 4 files changed +20
-4
lines changed
tests/report/reportportal
4 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ method are now executed in the exact order as listed in the config
13
13
file. This fixes a problem which has been introduced in the recent
14
14
``fmf `` update.
15
15
16
+ The :ref: `/plugins/report/reportportal ` plugin now exports all
17
+ test contact information, rather than just the first contact
18
+ instance.
19
+
16
20
17
21
tmt-1.40.0
18
22
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Original file line number Diff line number Diff line change 1
1
/bad:
2
2
summary: Failing test
3
-
3
+ contact:
4
+
5
+
4
6
test: echo "Something bad happened!"; false
5
7
6
8
/good:
7
9
summary: Passing test
8
- contact: tester_2 @redhat.com
10
+ contact: tester3 @redhat.com
9
11
test: echo "Everything's fine!"
10
12
id: 63f26fb7-69c4-4781-a06e-098e2b58129f
11
13
Original file line number Diff line number Diff line change @@ -189,10 +189,19 @@ rlJournalStart
189
189
# Check the rarities in the test attributes/parameters
190
190
if [[ $jq_element == attributes ]]; then
191
191
key=" contact"
192
+
192
193
value=" $( yq -r " .\" $test_name \" .$key " test.fmf) "
193
194
if [[ $value != null ]]; then
195
+ if [[ " $value " == * " ," * ]]; then
196
+ # Get the contact items as CSV (separated by a comma)
197
+ value=" $( yq -r " . | @csv" <<< $value ) "
198
+ fi
194
199
rlAssertGrep " $key " tmp_attributes.json -A1 > tmp_attributes_selection
195
- rlAssertGrep " $value " tmp_attributes_selection
200
+
201
+ IFS=, read -r -a contact_items <<< " $value"
202
+ for contact_item in " ${contact_items[@]} " ; do
203
+ rlAssertGrep " $contact_item " tmp_attributes_selection
204
+ done
196
205
else
197
206
rlAssertNotGrep " $key " tmp_attributes.json
198
207
fi
Original file line number Diff line number Diff line change @@ -618,7 +618,8 @@ def execute_rp_import(self) -> None:
618
618
if not test_name :
619
619
test_name = test .name
620
620
if test .contact :
621
- item_attributes .append ({"key" : "contact" , "value" : test .contact [0 ]})
621
+ item_attributes += [
622
+ {'key' : 'contact' , 'value' : contact } for contact in test .contact ]
622
623
if test .summary :
623
624
test_description = test .summary
624
625
if test .web_link ():
You can’t perform that action at this time.
0 commit comments