harbor/tests/resources/APITest-Util.robot
danfengliu 444de8536a Suppress urllib3 warning and fix nightly element locator issue and remove switch scanner
1. Since upgrade python to 3.7, some urllib3 warnings come out during
   execution, because missing disconnection when using request by docker
   library, it's not affect script execution, therefore ignore them first.
2. Replication tests failed in nightly due to new UI code, some element
   locators are not valid anymore;
3. Remove switch scanner test steps, since Clair was removed.

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-11-10 10:04:46 +08:00

18 lines
619 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} python ${testcase_name}
Log To Console ${output}
Log ${output}
Should Be Equal As Integers ${rc} 0