tests/k8s: Add skip is setup_common fails

At @danmihai1's suggestion add a die message in case
the call to setup_common fails, so we can see if in the test
output.

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
This commit is contained in:
stevenhorsman
2024-10-29 21:30:47 +00:00
parent 3f5bf9828b
commit 75cb1f46b8
7 changed files with 7 additions and 7 deletions

View File

@@ -16,7 +16,7 @@ setup() {
[ "${SNAPSHOTTER:-}" = "nydus" ] || skip "None snapshotter was found but this test requires one"
setup_common
setup_common || die "setup_common failed"
AUTHENTICATED_IMAGE="${AUTHENTICATED_IMAGE:-quay.io/kata-containers/confidential-containers-auth:test}"
AUTHENTICATED_IMAGE_USER=${AUTHENTICATED_IMAGE_USER:-}
AUTHENTICATED_IMAGE_PASSWORD=${AUTHENTICATED_IMAGE_PASSWORD:-}

View File

@@ -20,7 +20,7 @@ setup() {
[ "${SNAPSHOTTER:-}" = "nydus" ] || skip "None snapshotter was found but this test requires one"
setup_common
setup_common || die "setup_common failed"
ENCRYPTED_IMAGE="${ENCRYPTED_IMAGE:-ghcr.io/confidential-containers/test-container:multi-arch-encrypted}"
DECRYPTION_KEY="${DECRYPTION_KEY:-HUlOu8NWz8si11OZUzUJMnjiq/iZyHBJZMSD3BaqgMc=}"
DECRYPTION_KEY_ID="${DECRYPTION_KEY_ID:-ssh-demo}"

View File

@@ -22,7 +22,7 @@ setup() {
tag_suffix="-$(uname -m)"
fi
setup_common
setup_common || die "setup_common failed"
UNSIGNED_UNPROTECTED_REGISTRY_IMAGE="quay.io/prometheus/busybox:latest"
UNSIGNED_PROTECTED_REGISTRY_IMAGE="ghcr.io/confidential-containers/test-container-image-rs:unsigned${tag_suffix}"
COSIGN_SIGNED_PROTECTED_REGISTRY_IMAGE="ghcr.io/confidential-containers/test-container-image-rs:cosign-signed${tag_suffix}"

View File

@@ -15,7 +15,7 @@ setup() {
[ "${SNAPSHOTTER:-}" = "nydus" ] || skip "None snapshotter was found but this test requires one"
setup_common
setup_common || die "setup_common failed"
get_pod_config_dir
unencrypted_image="quay.io/prometheus/busybox:latest"
image_pulled_time_less_than_default_time="ghcr.io/confidential-containers/test-container:rust-1.79.0" # unpacked size: 1.41GB

View File

@@ -14,7 +14,7 @@ setup() {
agnhost_name="${container_images_agnhost_name}"
agnhost_version="${container_images_agnhost_version}"
setup_common
setup_common || die "setup_common failed"
get_pod_config_dir
}

View File

@@ -22,7 +22,7 @@ check_and_skip() {
setup() {
check_and_skip
setup_common
setup_common || die "setup_common failed"
}
@test "Test cannnot launch pod with measured boot enabled and incorrect hash" {

View File

@@ -21,7 +21,7 @@ setup() {
skip "Test skipped as KBS not setup"
fi
setup_common
setup_common || die "setup_common failed"
get_pod_config_dir
export K8S_TEST_ENV_YAML="${pod_config_dir}/pod-sealed-secret.yaml"