File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ func checkReachable(args []string) *checkers.Checker {
139
139
140
140
c , info , err := connectRedisGetInfo (opts )
141
141
if err != nil {
142
- return checkers .Unknown (err .Error ())
142
+ return checkers .Critical (err .Error ())
143
143
}
144
144
defer c .Close ()
145
145
Original file line number Diff line number Diff line change @@ -20,6 +20,14 @@ password=passpass
20
20
port=16379
21
21
image=redis:5
22
22
23
+ RET=$( $plugin reachable --port $port --password $password )
24
+ # check-redis should return CRITICAL (exit code 2) when the server is unreachable
25
+ if [ $? -ne 2 ]; then
26
+ echo " $prog : $plugin returned $? (2 is expected)" >&2
27
+ exit 2
28
+ fi
29
+ echo " $RET "
30
+
23
31
docker run --name " test-$plugin " -p " $port :6379" -d " $image " --requirepass " $password "
24
32
trap ' docker stop test-$plugin; docker rm test-$plugin; exit' EXIT
25
33
sleep 10
You can’t perform that action at this time.
0 commit comments