shellcheck: kata-deploy: Fix warnings

He were fixing the few warnings we found in the files present in the
functional tests for kata-deploy.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
This commit is contained in:
Fabiano Fidêncio 2025-03-03 12:39:35 +01:00
parent fd832d0feb
commit c337a21a4e
2 changed files with 7 additions and 7 deletions

View File

@ -24,9 +24,9 @@ function cleanup_runtimeclasses() {
# Cleanup any runtime class that was left behind in the cluster, in
# case of a test failure, apart from the default one that comes from
# AKS
for rc in `kubectl get runtimeclass -o name | grep -v "kata-mshv-vm-isolation" | sed 's|runtimeclass.node.k8s.io/||'`
for rc in $(kubectl get runtimeclass -o name | grep -v "kata-mshv-vm-isolation" | sed 's|runtimeclass.node.k8s.io/||')
do
kubectl delete runtimeclass $rc;
kubectl delete runtimeclass "${rc}";
done
}
@ -36,8 +36,8 @@ function cleanup() {
cleanup_runtimeclasses || true
if [ "${platform}" = "aks" ]; then
delete_cluster ${test_type}
if [[ "${platform}" = "aks" ]]; then
delete_cluster "${test_type}"
fi
}
@ -45,7 +45,7 @@ function main() {
export KATA_HOST_OS="${KATA_HOST_OS:-}"
platform="aks"
if [ "${KATA_HYPERVISOR}" = "qemu-tdx" ]; then
if [[ "${KATA_HYPERVISOR}" = "qemu-tdx" ]]; then
platform="tdx"
fi
export platform

View File

@ -10,8 +10,8 @@ set -e
kata_deploy_dir=$(dirname "$(readlink -f "$0")")
source "${kata_deploy_dir}/../../common.bash"
if [ -n "${KATA_DEPLOY_TEST_UNION:-}" ]; then
KATA_DEPLOY_TEST_UNION=($KATA_DEPLOY_TEST_UNION)
if [[ -n "${KATA_DEPLOY_TEST_UNION:-}" ]]; then
KATA_DEPLOY_TEST_UNION=("${KATA_DEPLOY_TEST_UNION}")
else
KATA_DEPLOY_TEST_UNION=( \
"kata-deploy.bats" \