fix: wait_for_log_output should ignore "No logs available" responses

The k8s logs command returns "No logs available" or "Pods not running"
when containers aren't ready yet. Since these are non-empty strings,
wait_for_log_output() was treating them as success, causing the
subsequent content check to fail. Also fix unquoted echo glob expansion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
pull/739/head
Prathamesh Musale 2026-04-02 08:11:03 +00:00
parent 7d7934ea7c
commit 787806d6fa
2 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ wait_for_log_output () {
local log_output=$( $TEST_TARGET_SO deployment --dir $test_deployment_dir logs )
if [[ ! -z "$log_output" ]]; then
if [[ ! -z "$log_output" ]] && [[ "$log_output" != *"No logs available"* ]] && [[ "$log_output" != *"Pods not running"* ]]; then
# if ready, return
return
else
@ -121,7 +121,7 @@ if [[ "$log_output_3" == *"listening on"* ]]; then
echo "deployment logs test: passed"
else
echo "deployment logs test: FAILED"
echo $log_output_3
echo "$log_output_3"
delete_cluster_exit
fi

View File

@ -38,7 +38,7 @@ wait_for_log_output () {
local log_output=$( $TEST_TARGET_SO deployment --dir $test_deployment_dir logs )
if [[ ! -z "$log_output" ]]; then
if [[ ! -z "$log_output" ]] && [[ "$log_output" != *"No logs available"* ]] && [[ "$log_output" != *"Pods not running"* ]]; then
# if ready, return
return
else