mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 10:45:45 +01:00
Replace pybot to python handy switch way
Signed-off-by: danfengliu <danfengl@vmware.com>
This commit is contained in:
parent
3cb5c32f42
commit
642471f820
@ -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...
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user