From 9a46d6b3ac20ed13df77ea2cc073b01729458d5b Mon Sep 17 00:00:00 2001 From: danfengliu Date: Mon, 19 Nov 2018 13:11:44 +0800 Subject: [PATCH] Add elif to if condition to make if condition as one sentence, so return code is accurate for each sentence. (#6291) Remove a space. Signed-off-by: danfengliu --- tests/travis/api_run.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/travis/api_run.sh b/tests/travis/api_run.sh index 1cd727f00d..68e9f3f5fe 100644 --- a/tests/travis/api_run.sh +++ b/tests/travis/api_run.sh @@ -29,15 +29,13 @@ docker ps # run db auth api cases if [ "$1" = 'DB' ]; then pybot -v ip:$2 -v HARBOR_PASSWORD:Harbor12345 /home/travis/gopath/src/github.com/goharbor/harbor/tests/robot-cases/Group0-BAT/API_DB.robot -fi -# run ldap api cases -if [ "$1" = 'LDAP' ]; then +elif [ "$1" = 'LDAP' ]; then + # run ldap api cases pybot -v ip:$2 -v HARBOR_PASSWORD:Harbor12345 /home/travis/gopath/src/github.com/goharbor/harbor/tests/robot-cases/Group0-BAT/API_LDAP.robot +else + rc=999 fi - rc=$? -echo $rc - ## --------------------------------------------- Upload Harbor CI Logs ------------------------------------------- timestamp=$(date +%s) outfile="integration_logs_$timestamp$TRAVIS_COMMIT.tar.gz"