diff --git a/tests/resources/Harbor-Pages/Project.robot b/tests/resources/Harbor-Pages/Project.robot index 026a9c68d..925565ed5 100644 --- a/tests/resources/Harbor-Pages/Project.robot +++ b/tests/resources/Harbor-Pages/Project.robot @@ -255,6 +255,8 @@ Click Index Achieve Go Into Index And Contain Artifacts [Arguments] ${tag_name} ${total_artifact_count}=3 ${archive_count}=0 ${return_immediately}=${false} + Run Keyword If '${total_artifact_count}' == '${null}' Return From Keyword PASS + Should Not Be Empty ${tag_name} Retry Double Keywords When Error Click Index Achieve ${tag_name} Page Should Contain Element ${tag_table_column_os_arch} FOR ${n} IN RANGE 1 10 ${out1} Run Keyword And Ignore Error Page Should Contain Element ${artifact_rows} limit=${total_artifact_count} diff --git a/tests/resources/Harbor-Pages/Replication.robot b/tests/resources/Harbor-Pages/Replication.robot index 67616e5ca..5ccd0377c 100644 --- a/tests/resources/Harbor-Pages/Replication.robot +++ b/tests/resources/Harbor-Pages/Replication.robot @@ -247,13 +247,15 @@ Image Should Be Replicated To Project Go Into Repo ${project}/${image} ${size}= Run Keyword If '${tag}'!='${EMPTY}' and '${expected_image_size_in_regexp}'!='${null}' Get Text //clr-dg-row[contains(., '${tag}')]//clr-dg-cell[4]/div Run Keyword If '${tag}'!='${EMPTY}' and '${expected_image_size_in_regexp}'!='${null}' Should Match Regexp '${size}' '${expected_image_size_in_regexp}' - Run Keyword If '${total_artifact_count}'!='${null}' Should Not Be Empty ${tag} - ${out} Run Keyword If '${total_artifact_count}'!='${null}' Go Into Index And Contain Artifacts ${tag} total_artifact_count=${total_artifact_count} archive_count=${archive_count} return_immediately=${true} - Log All out: ${out} - Exit For Loop If '${out}'=='PASS' + ${index_out} Go Into Index And Contain Artifacts ${tag} total_artifact_count=${total_artifact_count} archive_count=${archive_count} return_immediately=${true} + Log All index_out: ${index_out} + Run Keyword If '${index_out}'=='PASS' Exit For Loop Sleep 30 END +Verify Artifacts Counts In Archive + [Arguments] ${total_artifact_count} ${tag} ${total_artifact_count} ${archive_count} + Executions Result Count Should Be [Arguments] ${expected_status} ${expected_trigger_type} ${expected_result_count} Sleep 10 diff --git a/tests/robot-cases/Group3-Upgrade/prepare.py b/tests/robot-cases/Group3-Upgrade/prepare.py index 24898acf6..f55907a0c 100644 --- a/tests/robot-cases/Group3-Upgrade/prepare.py +++ b/tests/robot-cases/Group3-Upgrade/prepare.py @@ -596,7 +596,7 @@ def request(url, method, user = None, userp = None, **kwargs): if userp is None: userp = "Harbor12345" kwargs.setdefault('headers', kwargs.get('headers', {})) - kwargs['headers']['Accept'] = 'application/json' + #kwargs['headers']['Accept'] = 'application/json' if 'body' in kwargs: kwargs['headers']['Content-Type'] = 'application/json' kwargs['data'] = json.dumps(kwargs['body']) @@ -666,12 +666,12 @@ def do_data_creation(): harborAPI.update_systemsetting(data["configuration"]["emailsetting"]["emailfrom"], data["configuration"]["emailsetting"]["emailserver"], - float(data["configuration"]["emailsetting"]["emailport"]), + int(data["configuration"]["emailsetting"]["emailport"]), data["configuration"]["emailsetting"]["emailuser"], data["configuration"]["projectcreation"], data["configuration"]["selfreg"], - float(data["configuration"]["token"]), - float(data["configuration"]["robot_token"]), version=args.version) + int(data["configuration"]["token"]), + int(data["configuration"]["robot_token"]), version=args.version) harborAPI.add_sys_allowlist(data["configuration"]["deployment_security"], version=args.version)