harbor/tests/resources/APITest-Util.robot
danfengliu 2bf89e9356 Add docker-hub login before docker-hub pull
Due to docker-hub pull request rate limitation, we will use registed account to pull image
from docker-hub, therefore add docker-hub login in API tests.

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-11-22 21:11:05 +08:00

18 lines
671 B
Plaintext

*** Keywords ***
Make Swagger Client
${rc} ${output}= Run And Return Rc And Output make swagger_client
Log ${output}
[Return] ${rc}
Setup API Test
Retry Keyword N Times When Error 10 Make Swagger Client
Harbor API Test
[Arguments] ${testcase_name}
${current_dir}= Run pwd
Log To Console ${current_dir}
Log To Console ${ip}
${rc} ${output}= Run And Return Rc And Output SWAGGER_CLIENT_PATH=${current_dir}/harborclient HARBOR_HOST=${ip} DOCKER_USER=${DOCKER_USER} DOCKER_PWD=${DOCKER_PWD} python ${testcase_name}
Log To Console ${output}
Log ${output}
Should Be Equal As Integers ${rc} 0