Skip to content

Commit

Permalink
tests: pull-image: Only skip tests for TEEs
Browse files Browse the repository at this point in the history
On 1423420, I've mistakenly disabled the tests entirely, for both
non-TEEs and TEEs.

This happened as I didn't realise that `confidential_setup` would take
non-TEEs into consideration. :-/

Now, let me follow-up on that and make sure that the tests will be
running on non-TEEs.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
  • Loading branch information
fidencio committed May 9, 2024
1 parent f7276e5 commit 56d7aad
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions tests/integration/kubernetes/k8s-guest-pull-image.bats
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ load "${BATS_TEST_DIRNAME}/lib.sh"
load "${BATS_TEST_DIRNAME}/confidential_common.sh"

setup() {
if [ is_confidential_runtime_class ]; then
if [ is_confidential_hardware ]; then
skip "Due to issues related to pull-image integration skip tests for ${KATA_HYPERVISOR}."
fi

if [ ! is_confidential_runtime_class ] then;
skip "Test not supported for ${KATA_HYPERVISOR}."
fi

[ "${SNAPSHOTTER:-}" = "nydus" ] || skip "None snapshotter was found but this test requires one"

setup_common
Expand All @@ -22,10 +26,14 @@ setup() {
}

@test "Test we can pull an unencrypted image outside the guest with runc and then inside the guest successfully" {
if [ is_confidential_runtime_class ]; then
if [ is_confidential_hardware ]; then
skip "Due to issues related to pull-image integration skip tests for ${KATA_HYPERVISOR}."
fi

if [ ! is_confidential_runtime_class ] then;
skip "Test not supported for ${KATA_HYPERVISOR}."
fi

# 1. Create one runc pod with the $unencrypted_image_1 image
# We want to have one runc pod, so we pass a fake runtimeclass "runc" and then delete the runtimeClassName,
# because the runtimeclass is not optional in new_pod_config function.
Expand Down Expand Up @@ -220,10 +228,14 @@ setup() {
}

teardown() {
if [ is_confidential_runtime_class ]; then
if [ is_confidential_hardware ]; then
skip "Due to issues related to pull-image integration skip tests for ${KATA_HYPERVISOR}."
fi

if [ ! is_confidential_runtime_class ] then;
skip "Test not supported for ${KATA_HYPERVISOR}."
fi

[ "${SNAPSHOTTER:-}" = "nydus" ] || skip "None snapshotter was found but this test requires one"

kubectl describe pod "$pod_name"
Expand Down

0 comments on commit 56d7aad

Please sign in to comment.