ci: shellcheck SC2248

SC2248 (style): Prefer double quoting even when variables don't contain
special characters, might result in arguments difference, shouldn't in
our cases.

Related to: #10951

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
This commit is contained in:
Lukáš Doktor 2025-03-19 10:53:40 +01:00
parent d80e7c7644
commit 02deb1d782
No known key found for this signature in database
GPG Key ID: 26B362E47FCF22C1
3 changed files with 10 additions and 10 deletions

View File

@ -76,7 +76,7 @@ wait_for_reboot() {
echo "Set timeout to ${delta} seconds"
timer_start=$(date +%s)
while [[ ${#workers[@]} -gt 0 ]]; do
sleep ${sleep_time}
sleep "${sleep_time}"
now=$(date +%s)
if [[ $((${timer_start} + ${delta})) -lt ${now} ]]; then
echo "Timeout: not all workers rebooted"
@ -120,7 +120,7 @@ wait_mcp_update() {
echo "Timeout: not all workers updated" >&2
return 1
fi
sleep ${sleep_time}
sleep "${sleep_time}"
ready_count=$(oc get mcp worker \
-o jsonpath='{.status.readyMachineCount}')
degraded_count=$(oc get mcp worker \

View File

@ -27,10 +27,10 @@ sleep_time=5
cmd="oc get pod/${pod} -o jsonpath='{.status.containerStatuses[0].state}' | \
grep running > /dev/null"
info "Wait until the pod gets running"
waitForProcess ${wait_time} ${sleep_time} "${cmd}" || timed_out=$?
waitForProcess "${wait_time}" "${sleep_time}" "${cmd}" || timed_out=$?
if [[ -n "${timed_out}" ]]; then
oc describe pod/${pod}
oc delete pod/${pod}
oc describe "pod/${pod}"
oc delete "pod/${pod}"
die "${pod} not running"
fi
info "${pod} is running"
@ -39,7 +39,7 @@ info "${pod} is running"
#
hello_file=/tmp/hello
hello_msg='Hello World'
oc exec ${pod} -- sh -c "echo ${hello_msg} > ${hello_file}"
oc exec "${pod}" -- sh -c "echo ${hello_msg} > ${hello_file}"
info "Creating the service and route"
if oc apply -f "${script_dir}/smoke/service.yaml"; then
@ -89,6 +89,6 @@ else
oc delete -f "${script_dir}/smoke/service.yaml"
fi
info "Deleting the ${pod} pod"
oc delete pod/${pod} || test_status=$?
oc delete "pod/${pod}" || test_status=$?
exit ${test_status}
exit "${test_status}"

View File

@ -37,8 +37,8 @@ echo "${E2E_TEST}" > /tmp/tsts
# Remove previously-existing temporarily files as well as previous results
OUT=RESULTS/tmp
rm -Rf /tmp/*test* /tmp/e2e-*
rm -R ${OUT}
mkdir -p ${OUT}
rm -R "${OUT}"
mkdir -p "${OUT}"
# Run the tests ignoring the monitor health checks
./openshift-tests run --provider azure -o "${OUT}/job.log" --junit-dir "${OUT}" --file /tmp/tsts --max-parallel-tests 5 --cluster-stability Disruptive
RET=$?