From 1178fe20e9ce20e8e98992b75764584b2ac73fb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Wed, 11 Sep 2024 17:07:56 +0200 Subject: [PATCH] tests: Adapt error parser for failed image decryption MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With an older version of image-rs, we were getting the following error: ``` Message: failed to create containerd task: failed to create shim task: failed to handle layer: failed to get decrypt key no suitable key found for decrypting layer key: ``` However, with the version of image-rs we are bumping to, the error comes as: ``` Message: failed to create containerd task: failed to create shim task: failed to handle layer: failed to get decrypt key Caused by: no suitable key found for decrypting layer key: keyprovider: failed to unwrap key by ttrpc ``` Due to this change, I'm splitting the check in two different ones. Signed-off-by: Fabiano FidĂȘncio --- .../kubernetes/k8s-guest-pull-image-encrypted.bats | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/integration/kubernetes/k8s-guest-pull-image-encrypted.bats b/tests/integration/kubernetes/k8s-guest-pull-image-encrypted.bats index 2e7788705e..1a87198245 100644 --- a/tests/integration/kubernetes/k8s-guest-pull-image-encrypted.bats +++ b/tests/integration/kubernetes/k8s-guest-pull-image-encrypted.bats @@ -79,7 +79,8 @@ function create_pod_yaml_with_encrypted_image() { echo "Pod ${kata_pod_with_encrypted_image}: $(cat ${kata_pod_with_encrypted_image})" assert_pod_fail "${kata_pod_with_encrypted_image}" - assert_logs_contain "${node}" kata "${node_start_time}" 'failed to get decrypt key no suitable key found for decrypting layer key' + assert_logs_contain "${node}" kata "${node_start_time}" 'failed to get decrypt key' + assert_logs_contain "${node}" kata "${node_start_time}" 'no suitable key found for decrypting layer key' } @@ -106,7 +107,8 @@ function create_pod_yaml_with_encrypted_image() { echo "Pod ${kata_pod_with_encrypted_image}: $(cat ${kata_pod_with_encrypted_image})" assert_pod_fail "${kata_pod_with_encrypted_image}" - assert_logs_contain "${node}" kata "${node_start_time}" 'failed to get decrypt key no suitable key found for decrypting layer key' + assert_logs_contain "${node}" kata "${node_start_time}" 'failed to get decrypt key' + assert_logs_contain "${node}" kata "${node_start_time}" 'no suitable key found for decrypting layer key' } teardown() {