Skip to content

Commit cd5294d

Browse files
committed
test(tester): use valid arguments for role admission checks
1 parent 1ab8d3a commit cd5294d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎scripts/test-install-tester.sh‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,9 @@ for marker in /opt/ci-fleet/current /opt/ci-fleet-deployer/current /opt/ci-fleet
430430
for kind in directory symlink; do
431431
if [[ $kind == directory ]]; then mkdir "$root$marker"; else ln -s /missing "$root$marker"; fi
432432
for mode in check install; do
433-
if "$installer" "--$mode" --ref "$ref" >"$tmp/role-rejection.out" 2>&1; then fail "tester installer accepted another role: $marker $kind"; fi
433+
ref_args=()
434+
[[ $mode != install ]] || ref_args=(--ref "$ref")
435+
if "$installer" "--$mode" "${ref_args[@]}" >"$tmp/role-rejection.out" 2>&1; then fail "tester installer accepted another role: $marker $kind"; fi
434436
grep -Fq 'another ci-fleet host role is present' "$tmp/role-rejection.out" || fail 'role marker failed outside admission check'
435437
done
436438
if "$runtime" --health >"$tmp/role-rejection.out" 2>&1; then fail "tester runtime accepted another role: $marker $kind"; fi

0 commit comments

Comments
 (0)