Skip to content

Commit

Permalink
Fix the test for multiple test contacts
Browse files Browse the repository at this point in the history
  • Loading branch information
seberm committed Jan 30, 2025
1 parent 984a4f9 commit 641c073
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/report/reportportal/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,10 @@ rlJournalStart
if [[ $jq_element == attributes ]]; then
key="contact"
value="$(yq -r ".\"$test_name\".$key" test.fmf)"

if [[ $value != null ]]; then
if [[ "$value" == *","* ]]; then
# Get the contact items as CSV (separated by a comma)
value="$(yq -r ". | @csv" <<< $value)"
fi
# Get the contact items as values separated by a comma
value="$(yq -r '. | join(",")' <<< $value)"
rlAssertGrep "$key" tmp_attributes.json -A1 > tmp_attributes_selection

IFS=, read -r -a contact_items <<< "$value"
Expand Down

0 comments on commit 641c073

Please sign in to comment.