mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-12-11 08:35:15 +00:00
The current testing setup only supports running Kata on top of an Ubuntu host. This adds Mariner to the matrix of testable hosts for k8s tests, with Cloud Hypervisor as a VMM. As preparation for the upcoming PR that will change only the actual test code (rather than workflow YAMLs), this also introduces a new file `setup.sh` that will be used to set host-specific parameters at test run-time. Fixes: #6961 Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
73 lines
1.8 KiB
Bash
73 lines
1.8 KiB
Bash
#!/bin/bash
|
|
#
|
|
# Copyright (c) 2018 Intel Corporation
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
set -e
|
|
|
|
kubernetes_dir=$(dirname "$(readlink -f "$0")")
|
|
|
|
TARGET_ARCH="${TARGET_ARCH:-x86_64}"
|
|
KATA_HYPERVISOR="${KATA_HYPERVISOR:-qemu}"
|
|
K8S_TEST_DEBUG="${K8S_TEST_DEBUG:-false}"
|
|
|
|
if [ -n "${K8S_TEST_UNION:-}" ]; then
|
|
K8S_TEST_UNION=($K8S_TEST_UNION)
|
|
else
|
|
K8S_TEST_UNION=( \
|
|
"k8s-attach-handlers.bats" \
|
|
"k8s-caps.bats" \
|
|
"k8s-configmap.bats" \
|
|
"k8s-copy-file.bats" \
|
|
"k8s-cpu-ns.bats" \
|
|
"k8s-credentials-secrets.bats" \
|
|
"k8s-custom-dns.bats" \
|
|
"k8s-empty-dirs.bats" \
|
|
"k8s-env.bats" \
|
|
"k8s-exec.bats" \
|
|
"k8s-inotify.bats" \
|
|
"k8s-job.bats" \
|
|
"k8s-kill-all-process-in-container.bats" \
|
|
"k8s-limit-range.bats" \
|
|
"k8s-liveness-probes.bats" \
|
|
"k8s-memory.bats" \
|
|
"k8s-nested-configmap-secret.bats" \
|
|
"k8s-number-cpus.bats" \
|
|
"k8s-oom.bats" \
|
|
"k8s-optional-empty-configmap.bats" \
|
|
"k8s-optional-empty-secret.bats" \
|
|
"k8s-parallel.bats" \
|
|
"k8s-pid-ns.bats" \
|
|
"k8s-pod-quota.bats" \
|
|
"k8s-port-forward.bats" \
|
|
"k8s-projected-volume.bats" \
|
|
"k8s-qos-pods.bats" \
|
|
"k8s-replication.bats" \
|
|
"k8s-scale-nginx.bats" \
|
|
"k8s-seccomp.bats" \
|
|
"k8s-sysctls.bats" \
|
|
"k8s-security-context.bats" \
|
|
"k8s-shared-volume.bats" \
|
|
"k8s-nginx-connectivity.bats" \
|
|
)
|
|
fi
|
|
|
|
if [ ${KATA_HOST_OS} == "cbl-mariner" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
# we may need to skip a few test cases when running on non-x86_64 arch
|
|
arch_config_file="${kubernetes_dir}/filter_out_per_arch/${TARGET_ARCH}.yaml"
|
|
if [ -f "${arch_config_file}" ]; then
|
|
arch_k8s_test_union=$(${kubernetes_dir}/filter_k8s_test.sh ${arch_config_file} "${K8S_TEST_UNION[*]}")
|
|
mapfile -d " " -t K8S_TEST_UNION <<< "${arch_k8s_test_union}"
|
|
fi
|
|
|
|
info "Run tests"
|
|
for K8S_TEST_ENTRY in ${K8S_TEST_UNION[@]}
|
|
do
|
|
bats "${K8S_TEST_ENTRY}"
|
|
done
|