Skip to content

Commit bb957e8

Browse files
ogajduseclaude
authored andcommitted
Fix intermittent BATS module stream filter test failure
The grep pattern "5.21" treats the dot as a regex wildcard, matching "5<any-char>21" across the entire CSV line including the Uuid column which contains random Pulp UUIDs. This causes the wrong module stream to be selected ~4.5% of runs. Use awk to match exactly on the Stream column (field 3) instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 39653ec commit bb957e8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

bats/fb-katello-content.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ setup() {
322322
hammer content-view filter create --organization="${ORGANIZATION}" \
323323
--content-view="${CONTENT_VIEW_2}" --name="${FILTER3}" --inclusion=true --type=modulemd
324324
modulemd_id=$(hammer --csv --no-headers module-stream list --organization="${ORGANIZATION}" \
325-
| grep --max-count=1 "5.21" | cut -d, -f1)
325+
| awk -F, '$3 == "5.21" {print $1; exit}')
326326
hammer content-view filter rule create --organization="${ORGANIZATION}" \
327327
--content-view="${CONTENT_VIEW_2}" --content-view-filter="${FILTER3}" --module-stream-ids=$modulemd_id
328328
}

0 commit comments

Comments
 (0)