mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-27 19:35:32 +00:00
ci.ocp: Log the full grepped line rather than the expected msg
we are grepping for an expected message but it might contain extra bits of information fruitful for later debugging. Let's include it in the output and the full log in case of an error. Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
This commit is contained in:
parent
7ff2eb508e
commit
46e62eecb1
@ -183,10 +183,13 @@ wait_for_app_pods_message() {
|
||||
done
|
||||
for pod in "${pods[@]}"; do
|
||||
while :; do
|
||||
oc logs $namespace "$pod" | grep "$message" -q && echo "Found $message in $pod's log ($SECONDS)" && break;
|
||||
local log=$(oc logs $namespace "$pod")
|
||||
echo "$log" | grep "$message" -q && echo "Found $(echo "$log" | grep "$message") in $pod's log ($SECONDS)" && break;
|
||||
if [ "$SECONDS" -gt "$timeout" ]; then
|
||||
echo -n "Message '$message' not present in '${pod}' pod of the '-l app=\"$app\"' "
|
||||
echo "pods after ${SECONDS}s (${pods[@]})"
|
||||
echo "Pod $pod's output so far:"
|
||||
echo "$log"
|
||||
return -1
|
||||
fi
|
||||
sleep 1;
|
||||
|
Loading…
Reference in New Issue
Block a user