[skip e2e]Update the method to check health for deploy (#17359)

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
pull/17374/head
zhuwenxing 2022-06-03 17:14:04 +08:00 committed by GitHub
parent 48cf63a2d7
commit 99cbaccdf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -2,8 +2,8 @@
#to check containers all running and minio is healthy
function check_healthy {
Expect=$(grep "container_name" docker-compose.yml | wc -l)
Expect_health=$(grep "healthcheck" docker-compose.yml | wc -l)
Expect=$(yq '.services | length' 'docker-compose.yml')
Expect_health=$(yq '.services' 'docker-compose.yml' |grep 'healthcheck'|wc -l)
cnt=$(docker-compose ps | grep -E "running|Running|Up|up" | wc -l)
healthy=$(docker-compose ps | grep "healthy" | wc -l)
time_cnt=0
@ -27,4 +27,4 @@ function check_healthy {
done
}
check_healthy
check_healthy

View File

@ -30,8 +30,8 @@ function replace_image_tag {
#to check containers all running and minio is healthy
function check_healthy {
Expect=$(grep "container_name" docker-compose.yml | wc -l)
Expect_health=$(grep "healthcheck" docker-compose.yml | wc -l)
Expect=$(yq '.services | length' 'docker-compose.yml')
Expect_health=$(yq '.services' 'docker-compose.yml' |grep 'healthcheck'|wc -l)
cnt=$(docker-compose ps | grep -E "running|Running|Up|up" | wc -l)
healthy=$(docker-compose ps | grep "healthy" | wc -l)
time_cnt=0
@ -53,4 +53,4 @@ function check_healthy {
echo "running num $cnt expect num $Expect"
echo "healthy num $healthy expect num $Expect_health"
done
}
}