mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-04-27 02:56:50 +00:00
tests: Fix shellcheck issues in gha-run.sh
Fix shellcheck warnings and notes identified by running shellcheck --severity=style. Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
This commit is contained in:
@@ -10,7 +10,9 @@ set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
kata_tarball_dir="${2:-kata-artifacts}"
|
||||
export kata_tarball_dir
|
||||
kata_monitor_dir="$(dirname "$(readlink -f "$0")")"
|
||||
# shellcheck source=/dev/null
|
||||
source "${kata_monitor_dir}/../../common.bash"
|
||||
|
||||
function install_dependencies() {
|
||||
@@ -39,8 +41,10 @@ function install_dependencies() {
|
||||
cri_tools_version=$(get_from_kata_deps ".externals.critools.latest")
|
||||
declare -a github_deps
|
||||
github_deps[0]="cri_tools:${cri_tools_version}"
|
||||
# shellcheck disable=SC2154
|
||||
case "${CONTAINER_ENGINE}" in
|
||||
containerd)
|
||||
# shellcheck disable=SC2154
|
||||
github_deps[1]="cri_containerd:$(get_from_kata_deps ".externals.containerd.${CONTAINERD_VERSION}")"
|
||||
github_deps[2]="runc:$(get_from_kata_deps ".externals.runc.latest")"
|
||||
github_deps[3]="cni_plugins:$(get_from_kata_deps ".externals.cni-plugins.version")"
|
||||
@@ -52,19 +56,20 @@ function install_dependencies() {
|
||||
|
||||
for github_dep in "${github_deps[@]}"; do
|
||||
IFS=":" read -r -a dep <<< "${github_dep}"
|
||||
install_${dep[0]} "${dep[1]}"
|
||||
"install_${dep[0]}" "${dep[1]}"
|
||||
done
|
||||
|
||||
if [ "${CONTAINER_ENGINE}" = "crio" ]; then
|
||||
install_crio ${cri_tools_version#v}
|
||||
if [[ "${CONTAINER_ENGINE}" = "crio" ]]; then
|
||||
install_crio "${cri_tools_version#v}"
|
||||
fi
|
||||
}
|
||||
|
||||
function run() {
|
||||
# shellcheck disable=SC2154
|
||||
info "Running cri-containerd tests using ${KATA_HYPERVISOR} hypervisor"
|
||||
|
||||
enabling_hypervisor
|
||||
bash -c ${kata_monitor_dir}/kata-monitor-tests.sh
|
||||
bash -c "${kata_monitor_dir}/kata-monitor-tests.sh"
|
||||
}
|
||||
|
||||
function main() {
|
||||
|
||||
Reference in New Issue
Block a user