Skip to content

Commit

Permalink
count the pods right
Browse files Browse the repository at this point in the history
Signed-off-by: KfreeZ <[email protected]>
  • Loading branch information
KfreeZ committed Sep 4, 2024
1 parent 8e3c977 commit 82ead75
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/scripts/e2e/gmc_xeon_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function validate_audioqa() {
exit 1
fi

pods_count=$(kubectl get pods -n $AUDIOQA_NAMESPACE --no-headers | grep -v "Terminating" | wc -w)
pods_count=$(kubectl get pods -n $AUDIOQA_NAMESPACE --no-headers | grep -v "Terminating" | wc -l)
# expected_ready_pods, expected_external_pods, expected_total_pods
# pods_count-1 is to exclude the client pod in this namespace
check_gmc_status $AUDIOQA_NAMESPACE 'audioqa' $((pods_count-1)) 0 7
Expand Down Expand Up @@ -187,7 +187,7 @@ function validate_chatqna() {
exit 1
fi

pods_count=$(kubectl get pods -n $CHATQNA_NAMESPACE --no-headers | grep -v "Terminating" | wc -w)
pods_count=$(kubectl get pods -n $CHATQNA_NAMESPACE --no-headers | grep -v "Terminating" | wc -l)
# expected_ready_pods, expected_external_pods, expected_total_pods
# pods_count-1 is to exclude the client pod in this namespace
check_gmc_status $CHATQNA_NAMESPACE 'chatqa' $((pods_count-1)) 0 9
Expand Down Expand Up @@ -257,7 +257,7 @@ function validate_chatqna_with_dataprep() {
exit 1
fi

pods_count=$(kubectl get pods -n $CHATQNA_DATAPREP_NAMESPACE --no-headers | grep -v "Terminating" | wc -w)
pods_count=$(kubectl get pods -n $CHATQNA_DATAPREP_NAMESPACE --no-headers | grep -v "Terminating" | wc -l)
# expected_ready_pods, expected_external_pods, expected_total_pods
# pods_count-1 is to exclude the client pod in this namespace
check_gmc_status $CHATQNA_DATAPREP_NAMESPACE 'chatqa' $((pods_count-1)) 0 10
Expand Down Expand Up @@ -350,7 +350,7 @@ function validate_chatqna_in_switch() {
exit 1
fi

pods_count=$(kubectl get pods -n $CHATQNA_SWITCH_NAMESPACE --no-headers | grep -v "Terminating" | wc -w)
pods_count=$(kubectl get pods -n $CHATQNA_SWITCH_NAMESPACE --no-headers | grep -v "Terminating" | wc -l)
# expected_ready_pods, expected_external_pods, expected_total_pods
# pods_count-1 is to exclude the client pod in this namespace
check_gmc_status $CHATQNA_SWITCH_NAMESPACE 'switch' $((pods_count-1)) 0 15
Expand Down Expand Up @@ -443,7 +443,7 @@ function validate_modify_config() {
exit 1
fi

pods_count=$(kubectl get pods -n $MODIFY_STEP_NAMESPACE --no-headers | grep -v "Terminating" | wc -w)
pods_count=$(kubectl get pods -n $MODIFY_STEP_NAMESPACE --no-headers | grep -v "Terminating" | wc -l)
check_gmc_status $MODIFY_STEP_NAMESPACE 'codegen' $((pods_count-1)) 0 3
if [ $? -ne 0 ]; then
echo "GMC status is not as expected"
Expand Down Expand Up @@ -494,7 +494,7 @@ function validate_remove_step() {
exit 1
fi

pods_count=$(kubectl get pods -n $DELETE_STEP_NAMESPACE --no-headers | grep -v "Terminating" | wc -w)
pods_count=$(kubectl get pods -n $DELETE_STEP_NAMESPACE --no-headers | grep -v "Terminating" | wc -l)
check_gmc_status $DELETE_STEP_NAMESPACE 'codegen' $((pods_count-1)) 0 3
if [ $? -ne 0 ]; then
echo "GMC status is not as expected"
Expand Down

0 comments on commit 82ead75

Please sign in to comment.