Skip to content

Commit

Permalink
only use the first modulestream found
Browse files Browse the repository at this point in the history
sometimes `module-stream list` returns multiple modulestreams that match
"5.21", which later confuses `content-view filter rule create`. lets
explicitly take only the first match.
  • Loading branch information
evgeni committed Apr 18, 2024
1 parent 5f010bd commit c21d246
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bats/fb-katello-content.bats
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ setup() {
hammer content-view filter create --organization="${ORGANIZATION}" \
--content-view="${CONTENT_VIEW_2}" --name="${FILTER3}" --inclusion=true --type=modulemd
modulemd_id=$(hammer --csv --no-headers module-stream list --organization="${ORGANIZATION}" \
| grep "5.21" | cut -d, -f1)
| grep --max-count=1 "5.21" | cut -d, -f1)
hammer content-view filter rule create --organization="${ORGANIZATION}" \
--content-view="${CONTENT_VIEW_2}" --content-view-filter="${FILTER3}" --module-stream-ids=$modulemd_id
}
Expand Down

0 comments on commit c21d246

Please sign in to comment.