2021-04-08 09:32:31 +02:00
*** Keywords ***
Make Swagger Client
2021-05-11 08:55:14 +02:00
${rc} ${output}= Run And Return Rc And Output pip uninstall setuptools -y
LogAll ${output}
${rc} ${output}= Run And Return Rc And Output pip install -U pip setuptools
LogAll ${output}
2021-04-08 09:32:31 +02:00
${rc} ${output}= Run And Return Rc And Output make swagger_client
2021-05-11 08:55:14 +02:00
LogAll ${output}
2021-04-08 09:32:31 +02:00
[Return] ${rc}
Setup API Test
Retry Keyword N Times When Error 10 Make Swagger Client
Harbor API Test
2022-11-18 11:03:46 +01:00
[Arguments] ${testcase_name} &{param}
2021-04-08 09:32:31 +02:00
${current_dir}= Run pwd
2022-09-06 08:15:45 +02:00
${prev_lvl} Set Log Level NONE
2022-11-18 11:03:46 +01:00
${param_str}= Set Variable
IF &{param} != {}
FOR ${key} IN @{param.keys()}
${param_str}= Set Variable ${param_str} ${key}=${param['${key}']}
END
END
${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} ${param_str} python ${testcase_name}
2022-09-06 08:15:45 +02:00
${prev_lvl} Set Log Level ${prev_lvl}
2021-04-08 09:32:31 +02:00
Log ${output}
2022-09-06 08:15:45 +02:00
Should Be Equal As Integers ${rc} 0