tests: kata-deploy: Merge E2E tests to avoid timing issues

Merge the two E2E tests ("Custom RuntimeClass exists with correct
properties" and "Custom runtime can run a pod") into a single test, as
those 2 are very much dependent of each other.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
This commit is contained in:
Fabiano Fidêncio
2026-02-02 17:04:10 +01:00
parent fef93f1e08
commit 0fb2c500fd

View File

@@ -155,7 +155,7 @@ EOF
# End-to-End Tests (require cluster with kata-deploy)
# =============================================================================
@test "E2E: Custom RuntimeClass exists with correct properties" {
@test "E2E: Custom RuntimeClass exists and can run a pod" {
# Check RuntimeClass exists
run kubectl get runtimeclass "${CUSTOM_RUNTIME_HANDLER}" -o name
if [[ "${status}" -ne 0 ]]; then
@@ -195,15 +195,6 @@ EOF
echo "# Label app.kubernetes.io/managed-by: ${label}" >&3
[[ "${label}" == "Helm" ]]
BATS_TEST_COMPLETED=1
}
@test "E2E: Custom runtime can run a pod" {
# Check if the custom RuntimeClass exists
if ! kubectl get runtimeclass "${CUSTOM_RUNTIME_HANDLER}" &>/dev/null; then
skip "Custom RuntimeClass ${CUSTOM_RUNTIME_HANDLER} not found"
fi
# Create a test pod using the custom runtime
cat <<EOF | kubectl apply -f -
apiVersion: v1