From 3b72e9ffabf67423bdeb2ae4c773e3e464458e2f Mon Sep 17 00:00:00 2001 From: stevenhorsman Date: Wed, 10 Jul 2024 19:17:34 +0100 Subject: [PATCH] tests/k8s: Fix assert_logs_contain The pipe needs adding to the grep, otherwise the grep gets consumed as an argument to `print_node_journal` and run in the debug pod. Signed-off-by: stevenhorsman --- tests/integration/kubernetes/lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/kubernetes/lib.sh b/tests/integration/kubernetes/lib.sh index 26f98e924b..af04d82c0f 100644 --- a/tests/integration/kubernetes/lib.sh +++ b/tests/integration/kubernetes/lib.sh @@ -78,7 +78,7 @@ assert_logs_contain() { # 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" + | grep "$message" } # Create a pod then assert it fails to run. Use in tests that you expect the