diff --git a/tests/ci/api_common_install.sh b/tests/ci/api_common_install.sh index dad983387..92112fbcc 100755 --- a/tests/ci/api_common_install.sh +++ b/tests/ci/api_common_install.sh @@ -17,6 +17,8 @@ if [ "$2" = 'LDAP' ]; then cd tests && sudo ./ldapprepare.sh && cd .. fi +sudo apt-get update -y && sudo apt-get install -y python3.6 +sudo rm /usr/bin/python && sudo ln -s /usr/bin/python3.6 /usr/bin/python # prepare a chart file for API_DB test... diff --git a/tests/ci/api_run.sh b/tests/ci/api_run.sh index 753353fcc..c5577c1ef 100755 --- a/tests/ci/api_run.sh +++ b/tests/ci/api_run.sh @@ -28,9 +28,12 @@ set +e docker ps +python --version +pip -V + # run db auth api cases if [ "$1" = 'DB' ]; then - pybot -v ip:$2 -v HARBOR_PASSWORD:Harbor12345 $DIR/../../tests/robot-cases/Group0-BAT/API_DB.robot + robot -v ip:$2 -v HARBOR_PASSWORD:Harbor12345 $DIR/../../tests/robot-cases/Group0-BAT/API_DB.robot elif [ "$1" = 'LDAP' ]; then # run ldap api cases python $DIR/../../tests/configharbor.py -H $IP -u $HARBOR_ADMIN -p $HARBOR_ADMIN_PASSWD -c auth_mode=ldap_auth \ @@ -39,7 +42,7 @@ elif [ "$1" = 'LDAP' ]; then ldap_search_password=admin \ ldap_base_dn=dc=example,dc=com \ ldap_uid=cn - pybot -v ip:$2 -v HARBOR_PASSWORD:Harbor12345 $DIR/../../tests/robot-cases/Group0-BAT/API_LDAP.robot + robot -v ip:$2 -v HARBOR_PASSWORD:Harbor12345 $DIR/../../tests/robot-cases/Group0-BAT/API_LDAP.robot else rc=999 fi