Skip to content

Commit fb8c975

Browse files
committed
Prepare a test for multiple test contacts
1 parent ce127a7 commit fb8c975

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

tests/report/reportportal/data/test.fmf

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
/bad:
22
summary: Failing test
3-
3+
contact:
4+
5+
46
test: echo "Something bad happened!"; false
57

68
/good:
79
summary: Passing test
8-
contact: tester_2@redhat.com
10+
contact: tester3@redhat.com
911
test: echo "Everything's fine!"
1012
id: 63f26fb7-69c4-4781-a06e-098e2b58129f
1113

tests/report/reportportal/test.sh

+12
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,14 @@ rlJournalStart
191191
key="contact"
192192
value="$(yq -r ".\"$test_name\".$key" test.fmf)"
193193
if [[ $value != null ]]; then
194+
# TODO: Fix the test here! The output of yq is list of
195+
# contact in the case of multiple contacts (test==/bad)
196+
# and a string in a case when one contact is provided
197+
# for the test (test==/good). We must somehow handle
198+
# both situations.
199+
#
200+
# If yq returns list, we must check both contacts in the response JSON
201+
# If yq returns just a string value, we must check only one contact in the response JSON
194202
rlAssertGrep "$key" tmp_attributes.json -A1 > tmp_attributes_selection
195203
rlAssertGrep "$value" tmp_attributes_selection
196204
else
@@ -201,6 +209,10 @@ rlJournalStart
201209
rlAssertNotGrep "$key" tmp_attributes.json
202210
fi
203211

212+
# REMOVE ME: just for testing
213+
#echo "EXITING OMG"
214+
#exit 99
215+
204216
rm tmp_attributes*
205217
done
206218

0 commit comments

Comments
 (0)