From c21d246805d635c915958cfe6298244781e0a35b Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Thu, 18 Apr 2024 11:00:01 +0200 Subject: [PATCH] only use the first modulestream found 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. --- bats/fb-katello-content.bats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bats/fb-katello-content.bats b/bats/fb-katello-content.bats index 1c751eeb1..754520f66 100755 --- a/bats/fb-katello-content.bats +++ b/bats/fb-katello-content.bats @@ -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 }