diff options
author | ChenjieXu <chenjie.xu@intel.com> | 2020-04-01 13:26:54 +0800 |
---|---|---|
committer | Chenjie Xu <chenjie.xu@intel.com> | 2020-05-08 01:43:34 +0000 |
commit | 1449bbe36e44315fa6e74375e7ab0607dd182344 (patch) | |
tree | 806a01996d93b605d1be3921fc2ba5a641665d4c /kud/tests/_functions.sh | |
parent | 3d8e9a41d55cd862e9963e8c561e80f9ec09d484 (diff) |
Integrate Openness EAA
Openness EAA provides application/service registration
and authentication. EAA is integrated by running EAA via
ONAP4K8S.
Issue-ID: MULTICLOUD-1044
Signed-off-by: ChenjieXu <chenjie.xu@intel.com>
Change-Id: I66dffc5bcfc66675f6b62672e32496ec7f71454c
Diffstat (limited to 'kud/tests/_functions.sh')
-rwxr-xr-x | kud/tests/_functions.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/kud/tests/_functions.sh b/kud/tests/_functions.sh index d585086b..34c22569 100755 --- a/kud/tests/_functions.sh +++ b/kud/tests/_functions.sh @@ -193,6 +193,28 @@ function wait_for_pod { done } +# wait_for_deployment() - Wait until the deployment is ready +function wait_for_deployment { + #Example usage: + # wait_for_deployment $DEPLOYMENT_NAME $REPLICAS + # wait_for_deployment example_deployment 2 + + status="0/" + + while [[ "$status" != $2* ]]; do + new_status=`kubectl get deployment -A | grep $1 | awk '{print $3}'` + if [[ "$new_status" != "$status" ]]; then + status="$new_status" + fi + + pod_status=`kubectl get pods -A | grep $1 | awk '{print $4}'` + if [[ $pod_status =~ "Err" ]]; then + echo "Deployment $1 error" + exit 1 + fi + done +} + # setup() - Base testing setup shared among functional tests function setup { if ! $(kubectl version &>/dev/null); then |