Merge pull request #10031 from ChengyuZhu6/fix-log-contain-tdx

tests: Fix missing log on TDX
This commit is contained in:
Hyounggyu Choi 2024-07-20 07:26:08 +02:00 committed by GitHub
commit c774cd6bb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 12 deletions

View File

@ -11,11 +11,6 @@ load "${BATS_TEST_DIRNAME}/confidential_kbs.sh"
export KBS="${KBS:-false}"
setup() {
# Log checking not working on TDX
if [ "${KATA_HYPERVISOR}" = "qemu-tdx" ]; then
skip "Test skipped on ${KATA_HYPERVISOR}, see https://github.com/kata-containers/kata-containers/issues/10011"
fi
if ! is_confidential_runtime_class; then
skip "Test not supported for ${KATA_HYPERVISOR}."
fi
@ -138,10 +133,6 @@ function create_pod_yaml_with_private_image() {
}
teardown() {
if [ "${KATA_HYPERVISOR}" = "qemu-tdx" ]; then
skip "Test skipped on ${KATA_HYPERVISOR}, see https://github.com/kata-containers/kata-containers/issues/10011"
fi
if ! is_confidential_runtime_class; then
skip "Test not supported for ${KATA_HYPERVISOR}."
fi

View File

@ -77,8 +77,7 @@ assert_logs_contain() {
local message="$4"
# Note: with image-rs we get more than the default 1000 lines of logs
print_node_journal "$node" "$log_id" --since "$datetime" -n 100000 \
| grep "$message"
print_node_journal "$node" "$log_id" --since "$datetime" | grep "$message"
}
# Create a pod then assert it fails to run. Use in tests that you expect the
@ -250,7 +249,7 @@ print_node_journal() {
shift 2
local img="quay.io/prometheus/busybox"
kubectl debug --image "$img" -q -it "node/${node}" \
kubectl debug --image "$img" -q -i "node/${node}" \
-- chroot /host journalctl -x -t "$id" --no-pager "$@"
# Delete the debugger pod
kubectl get pods -o name | grep "node-debugger-${node}" | \