mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-24 22:43:05 +00:00
Merge pull request #10031 from ChengyuZhu6/fix-log-contain-tdx
tests: Fix missing log on TDX
This commit is contained in:
commit
c774cd6bb0
@ -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
|
||||
|
@ -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}" | \
|
||||
|
Loading…
Reference in New Issue
Block a user