Merge pull request #77 from csabapalfi/refactor_process_count_check

Make process count check a bit easier to read
This commit is contained in:
Thomas Sjögren 2015-08-17 19:43:06 +02:00
commit a1d9a18400

View file

@ -62,8 +62,8 @@ else
fail=0
printcheck=0
for c in $containers; do
processes=$(docker exec "$c" ps -el 2>/dev/null | wc -l | awk '{print $1}')
if [ "$processes" -gt 5 ]; then
processes=$(docker exec "$c" ps -el 2>/dev/null | tail -n +2 | grep -c -v "ps -el")
if [ "$processes" -gt 1 ]; then
# If it's the first container, fail the test
if [ $fail -eq 0 ]; then
warn "$check_5_3"