f-70: e2e: marqueurs d'échec connu (known, known_flaky, --connus) rattachés aux tickets #70
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
362f26644e
commit
a53dd6d0d7
11 changed files with 89 additions and 23 deletions
|
|
@ -16,6 +16,26 @@ check () {
|
|||
fi
|
||||
}
|
||||
|
||||
known () {
|
||||
local ticket="${1}" desc="${2}" out
|
||||
shift 2
|
||||
if out=$("$@" 2>&1); then
|
||||
echo "INATTENDU: ${desc} (${ticket}) passe, retirer le marqueur known"
|
||||
else
|
||||
echo "CONNU: ${desc} (${ticket})${out:+ — $(printf '%s' "${out}" | tail -n 1)}"
|
||||
fi
|
||||
}
|
||||
|
||||
known_flaky () {
|
||||
local ticket="${1}" desc="${2}" out
|
||||
shift 2
|
||||
if out=$("$@" 2>&1); then
|
||||
echo "RÉUSSI: ${desc} (${ticket}, intermittent : non reproduit cette fois)"
|
||||
else
|
||||
echo "CONNU: ${desc} (${ticket}, intermittent)${out:+ — $(printf '%s' "${out}" | tail -n 1)}"
|
||||
fi
|
||||
}
|
||||
|
||||
info () { echo "INFO: ${1}"; }
|
||||
|
||||
api_post () {
|
||||
|
|
|
|||
|
|
@ -75,9 +75,20 @@ wait_watchdog () {
|
|||
return 1
|
||||
}
|
||||
|
||||
watchdog_alerts () {
|
||||
journalctl -u agent --since "-${1:-300}s" --no-pager -o cat | grep -F 'watchdog: inconsistency detected'
|
||||
}
|
||||
|
||||
watchdog_quiet () {
|
||||
local out
|
||||
out=$(journalctl -u agent --since "-${1:-300}s" --no-pager -o cat | grep -F 'watchdog: inconsistency detected') || return 0
|
||||
out=$(watchdog_alerts "${1:-300}" | { if [ -n "${2:-}" ]; then grep -vF -- "${2}"; else cat; fi; }) || return 0
|
||||
printf '%s\n' "${out}"
|
||||
return 1
|
||||
}
|
||||
|
||||
watchdog_quiet_about () {
|
||||
local out
|
||||
out=$(watchdog_alerts "${1}" | grep -F -- "${2}") || return 0
|
||||
printf '%s\n' "${out}"
|
||||
return 1
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue