Skip to content

Commit 075ba32

Browse files
committed
test(fleet): exercise active consumer filtering
1 parent f7d742d commit 075ba32

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

‎scripts/propagate-sha-bump.sh‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,9 @@ filter_forks() {
253253
mv "$out" "$tsv"
254254
}
255255

256-
# Skip fork-filter if the operator supplied an override TSV — they've already vetted it.
257-
if [[ -s "$CONSUMERS_TSV" && -z "${CONSUMERS_TSV_OVERRIDE:-}" ]]; then
256+
# Apply the same active-root eligibility check to searched and overridden
257+
# consumers so the test seam cannot bypass the production safety boundary.
258+
if [[ -s "$CONSUMERS_TSV" ]]; then
258259
filter_forks "$CONSUMERS_TSV"
259260
fi
260261

‎tests/propagate-sha-bump-smoke.sh‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ case "$*" in
2525
*'/compare/'*) printf '%s\n' "${MOCK_COMPARE_STATUS:-ahead}" ;;
2626
*'/contents/'*) printf '%s\n' file ;;
2727
*'repos/hyperpolymath/standards --jq .default_branch'*) printf '%s\n' main ;;
28+
*'--jq [.fork, .archived] | @tsv'*) printf 'false\tfalse\n' ;;
2829
*) printf '%s\n' '{}' ;;
2930
esac
3031
EOF
@@ -163,6 +164,14 @@ rc=$?
163164
set -e
164165
assert_exit "DRY_RUN with valid finding → exit 0" 0 "$rc"
165166

167+
if printf '%s' "$out" | grep -q 'hyperpolymath/repo-a'; then
168+
echo "ok active override consumer remains eligible"
169+
((pass++))
170+
else
171+
echo "FAIL active override consumers were filtered out"
172+
((fail++))
173+
fi
174+
166175
if printf '%s' "$out" | grep -q '"event_type": "propagate-sha-bump"'; then
167176
echo "ok payload contains event_type"
168177
((pass++))

0 commit comments

Comments
 (0)