mirror of https://github.com/milvus-io/milvus.git
[skip e2e]Update the method to check health for deploy (#17359)
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>pull/17374/head
parent
48cf63a2d7
commit
99cbaccdf1
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue