diff --git a/tests/integration/kubernetes/k8s-confidential-attestation.bats b/tests/integration/kubernetes/k8s-confidential-attestation.bats index 5ebd649b18..f1b648c58b 100644 --- a/tests/integration/kubernetes/k8s-confidential-attestation.bats +++ b/tests/integration/kubernetes/k8s-confidential-attestation.bats @@ -93,7 +93,7 @@ teardown() { [ -n "${pod_name:-}" ] && kubectl describe "pod/${pod_name}" || true [ -n "${pod_config_dir:-}" ] && kubectl delete -f "${K8S_TEST_YAML}" || true - if [ -n "${node_start_time}:-}" ]; then + if [[ -n "${node_start_time}:-}" && -z "$BATS_TEST_COMPLETED" ]]; then echo "DEBUG: system logs of node '$node' since test start time ($node_start_time)" print_node_journal "$node" "kata" --since "$node_start_time" || true fi