forked from okurz/openqa_monitoring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_logwarn
executable file
·40 lines (34 loc) · 2.48 KB
/
test_logwarn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh -e
set -o pipefail
out=$(env options="-f /dev/null -z" file=in.log sh -ex ./logwarn_openqa) || true
echo "test error messages are included"
echo $out | grep -q ':error.*File iso/bar.iso is not a registered asset'
echo $out | grep -q ':error.*MISSING S:scheduled R:none'
echo $out | grep -q 'FOOBAR='
echo "test debug and info messages are not included"
echo $out | grep -q '\[19382:info\] GRU: removing /var/lib/openqa/factory/iso/whocares.iso' && exit 2
echo $out | grep -q '\[websockets:debug\] \[DBIx debug\] Took 0.00216508 seconds executed: UPDATE workers ...' && exit 2
echo "not prefixed output is NOT included"
echo $out | grep -q 'more output that is not properly prefixed' && exit 2
echo "multi-line debug is not included"
echo $out | grep -q '\[Thu Oct 6 01:15:54 2016\] \[27316:debug\] dispatching IPC job_grab to scheduler: \[' && exit 2
echo $out | grep -q 'blocking => 0,' && exit 2
echo $out | grep -q 'cpu_modelname => undef,' && exit 2
echo $out | grep -q '^\]$' && exit 2
echo "Known and blacklisted log lines are not included"
echo $out | grep -q '\[4608:warn\] 619442 got a status update but has no worker. huh?' && exit 2
echo $out | grep -q '\[8980:warn\] 619391 got an artefact but has no worker. huh?' && exit 2
echo $out | grep -q ':error.*Asset iso/foo.iso is not in any job group' && exit 2
echo $out | grep -q 'is not in any job group, will delete in' && exit 2
echo $out | grep -q '[websockets:warn] dead job 813295 aborted and duplicated 813306' && exit 2
echo $out | grep -q '\[1719:warn\] AMQP connection error: Connect timeout' && exit 2
echo $out | grep -q '\[29213:warn\] Error sending AMQP event: Channel is not open' && exit 2
echo $out | grep -q '\[25898:warn\] AMQP connection closed' && exit 2
echo $out | grep -q '\[21257:warn\] Error on AMQP channel received: Failed closing channel: Unknown channel id received: 1' && exit 2
echo $out | grep -q '\[31798:warn\] no products found, retrying version wildcard' && exit 2
echo $out | grep -q '\[14008:warn\] START_AFTER_TEST=RAID0:ppc64le not found - check for typos and dependency cycles' && exit 2
echo $out | grep -q 'Worker not found for given connection during connection close' && exit 2
echo $out | grep -q '\[15550:warn] AMQP connection error: SSL connect attempt failed with unknown error' && exit 2
echo $out | grep -q "can't remove d81/349/2cab90e04faac6f7a112c5ed90.png" && exit 2
echo $out | grep -q "\[scheduler:warn\] openqaworker5:20 wants to grab a new job - killing the old one: 993795" && exit 2
echo "PASSED"