From 9f113923fb270f18831dd1fa3c7a6ebea178968a Mon Sep 17 00:00:00 2001 From: zouyee Date: Fri, 15 Feb 2019 23:07:11 +0800 Subject: [PATCH] Checking e2e build successed --- test/e2e-tests.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/e2e-tests.sh b/test/e2e-tests.sh index 6ec5c16..b25335e 100755 --- a/test/e2e-tests.sh +++ b/test/e2e-tests.sh @@ -37,9 +37,15 @@ function run_buildpack_test() { kubectl apply -f test/build-buildpack.yaml || return 1 # Wait 5s for processing to start sleep 5 - echo "Checking that build was started:" - kubectl get build buildpack-build -oyaml - # TODO(adrcunha): Add proper verification. + echo "Checking that build was successed:" + for i in {1..100};do + kubectl get build buildpack-build -o 'jsonpath={.status.conditions[?(@.type=="Succeeded")].status}' 1>/dev/null 2>&1 + if [ $? -ne 1 ]; then + break + fi + echo "The build was successed." + sleep 2 + done } # Script entry point.