From 8f9822d168e4429f6ce7e6c721a03f0881020481 Mon Sep 17 00:00:00 2001 From: danfengliu Date: Mon, 30 Mar 2020 17:44:56 +0800 Subject: [PATCH] Add nightly test case of push docker manifest list 1. Add notary tool in E2E Dockerfile; 2. Add push docker manifest list test in nightly; 3. Modify document for e2e user guide; 4. Add CNAB tool in E2E Dockerfile; Signed-off-by: danfengliu --- .../e2e-api-python-based-scripting-guide.md | 4 +- tests/e2e-image/Dockerfile | 10 + tests/resources/CNAB_Util.robot | 25 + tests/resources/Docker-Util.robot | 11 + .../Project-Artifact-Elements.robot | 2 + tests/resources/Harbor-Pages/Project.robot | 3 + tests/resources/Util.robot | 1 + tests/robot-cases/Group0-Util/bundle.json | 1 + .../Group0-Util/cnab_push_bundle.sh | 12 + .../Group0-Util/docker_push_manifest_list.sh | 22 + tests/robot-cases/Group1-Nightly/Common.robot | 1419 +++++++++-------- 11 files changed, 822 insertions(+), 688 deletions(-) create mode 100644 tests/resources/CNAB_Util.robot create mode 100644 tests/robot-cases/Group0-Util/bundle.json create mode 100755 tests/robot-cases/Group0-Util/cnab_push_bundle.sh create mode 100755 tests/robot-cases/Group0-Util/docker_push_manifest_list.sh diff --git a/docs/1.10/build-customize-contribute/e2e-api-python-based-scripting-guide.md b/docs/1.10/build-customize-contribute/e2e-api-python-based-scripting-guide.md index 3a96c7cd7..1055a2f7a 100644 --- a/docs/1.10/build-customize-contribute/e2e-api-python-based-scripting-guide.md +++ b/docs/1.10/build-customize-contribute/e2e-api-python-based-scripting-guide.md @@ -20,12 +20,12 @@ Before scripting, please make sure swagger client has been made by "make swagger We use $HARBORCLIENT_PATH represent the path of "harborclient" you've made by "make swagger_client". -Deploy Harbor instance for testing, and we will use $HARBOR_URL to represent the deployed Harbor in this document. +Deploy Harbor instance for testing, and we will use $HARBOR_IP_ADDR to represent the deployed Harbor in this document. Harbor E2E API test scripts will import python library under archive "harborclient", please set OS environment variant for Harbor E2E API test scripts: -1. `export HARBOR_HOST=$HARBOR_URL` +1. `export HARBOR_HOST=$HARBOR_IP_ADDR` 2. `export SWAGGER_CLIENT_PATH=$HARBORCLIENT_PATH` Until now, we have all preparation work done. diff --git a/tests/e2e-image/Dockerfile b/tests/e2e-image/Dockerfile index ca6f6c3cf..150941f95 100644 --- a/tests/e2e-image/Dockerfile +++ b/tests/e2e-image/Dockerfile @@ -85,6 +85,10 @@ RUN wget https://get.helm.sh/helm-v3.0.0-linux-386.tar.gz && tar zxvf helm-v3.0. mv linux-386/helm /usr/local/bin/helm3 && \ helm3 plugin install https://github.com/chartmuseum/helm-push +RUN wget https://github.com/theupdateframework/notary/releases/download/v0.6.1/notary-Linux-amd64 && \ + chmod +x notary-Linux-amd64 && \ + mv notary-Linux-amd64 /usr/local/bin/notary + RUN wget http://nchc.dl.sourceforge.net/sourceforge/tcl/tcl8.4.11-src.tar.gz && \ tar xfvz tcl8.4.11-src.tar.gz && \ cd tcl8.4.11/unix && \ @@ -105,6 +109,12 @@ RUN wget http://nchc.dl.sourceforge.net/sourceforge/tcl/tcl8.4.11-src.tar.gz && cd /ixdba.net/bin && \ mv expect /usr/local/bin/expect +RUN CNAB_PATH=$(go env GOPATH)/src/github.com/docker && mkdir -p $CNAB_PATH && cd $CNAB_PATH && git clone https://github.com/cnabio/cnab-to-oci.git && \ + cd cnab-to-oci && git checkout v0.3.0-beta4 && \ + go list && \ + make build && \ + mv bin/cnab-to-oci /usr/local/bin + # Add docker in docker support # version: docker:1.13-dind # reference: https://github.com/docker-library/docker/blob/b202ec7e529f5426e2ad7e8c0a8b82cacd406573/1.13/dind/Dockerfile diff --git a/tests/resources/CNAB_Util.robot b/tests/resources/CNAB_Util.robot new file mode 100644 index 000000000..f7f60410a --- /dev/null +++ b/tests/resources/CNAB_Util.robot @@ -0,0 +1,25 @@ +# Copyright Project Harbor Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License + +*** Settings *** +Documentation This resource provides helper functions for docker operations +Library OperatingSystem +Library Process + +*** Keywords *** +CNAB Push Bundle + [Arguments] ${ip} ${user} ${pwd} ${target} ${bundle_file} + ${rc} ${output}= Run And Return Rc And Output ./tests/robot-cases/Group0-Util/cnab_push_bundle.sh ${ip} ${user} ${pwd} ${target} ${bundle_file} + Log ${output} + Should Be Equal As Integers ${rc} 0 \ No newline at end of file diff --git a/tests/resources/Docker-Util.robot b/tests/resources/Docker-Util.robot index f5088d515..ee03a1d47 100644 --- a/tests/resources/Docker-Util.robot +++ b/tests/resources/Docker-Util.robot @@ -107,6 +107,9 @@ Get Container IP # If you are running this keyword in a container, make sure it is run with --privileged turned on Start Docker Daemon Locally ${pid}= Run pidof dockerd + #${rc} ${output}= Run And Return Rc And Output ./tests/robot-cases/Group0-Util/docker_config.sh + #Log ${output} + #Should Be Equal As Integers ${rc} 0 Return From Keyword If '${pid}' != '${EMPTY}' OperatingSystem.File Should Exist /usr/local/bin/dockerd-entrypoint.sh ${handle}= Start Process /usr/local/bin/dockerd-entrypoint.sh dockerd>./daemon-local.log 2>&1 shell=True @@ -122,6 +125,8 @@ Prepare Docker Cert [Arguments] ${ip} Wait Unitl Command Success mkdir -p /etc/docker/certs.d/${ip} Wait Unitl Command Success cp harbor_ca.crt /etc/docker/certs.d/${ip} + Wait Unitl Command Success cp harbor_ca.crt /usr/local/share/ca-certificates/ + Wait Unitl Command Success update-ca-certificates Kill Local Docker Daemon [Arguments] ${handle} ${dockerd-pid} @@ -154,3 +159,9 @@ Docker Tag Docker Push [Arguments] ${image} Wait Unitl Command Success docker push ${image} + +Docker Push Index + [Arguments] ${ip} ${user} ${pwd} ${index} ${image1} ${image2} + ${rc} ${output}= Run And Return Rc And Output ./tests/robot-cases/Group0-Util/docker_push_manifest_list.sh ${ip} ${user} ${pwd} ${index} ${image1} ${image2} + Log ${output} + Should Be Equal As Integers ${rc} 0 diff --git a/tests/resources/Harbor-Pages/Project-Artifact-Elements.robot b/tests/resources/Harbor-Pages/Project-Artifact-Elements.robot index c009853c0..f08145fc9 100644 --- a/tests/resources/Harbor-Pages/Project-Artifact-Elements.robot +++ b/tests/resources/Harbor-Pages/Project-Artifact-Elements.robot @@ -19,4 +19,6 @@ Documentation This resource provides any keywords related to the Harbor private ${artifact_action_xpath} //clr-dg-action-bar/clr-dropdown/span[contains(@class,'dropdown-toggle')] ${artifact_action_delete_xpath} //clr-dropdown-menu//div[contains(.,'Delete')] ${artifact_action_copy_xpath} //clr-dropdown-menu//div[contains(.,'Copy') and @aria-label='retag'] +${artifact_achieve_icon} //artifact-list-tab//clr-datagrid//clr-dg-row[contains(.,'sha256')]//clr-dg-cell[1]//clr-tooltip//clr-icon +${artifact_rows} //artifact-list-tab//clr-datagrid//clr-dg-row[contains(.,'sha256')] diff --git a/tests/resources/Harbor-Pages/Project.robot b/tests/resources/Harbor-Pages/Project.robot index dbc08608f..25d0a4a14 100644 --- a/tests/resources/Harbor-Pages/Project.robot +++ b/tests/resources/Harbor-Pages/Project.robot @@ -210,6 +210,9 @@ Go Into Repo Retry Wait Element ${tag_table_column_size} Capture Page Screenshot gointo_${repoName}.png +Go Into Index + Retry Wait Element ${artifact_achieve_icon} + Switch To CardView Retry Element Click xpath=//hbr-repository-gridview//span[@class='card-btn']/clr-icon Sleep 5 diff --git a/tests/resources/Util.robot b/tests/resources/Util.robot index e4817d8b4..de2f44b09 100644 --- a/tests/resources/Util.robot +++ b/tests/resources/Util.robot @@ -69,6 +69,7 @@ Resource Harbor-Pages/OIDC_Auth.robot Resource Harbor-Pages/OIDC_Auth_Elements.robot Resource Harbor-Pages/Verify.robot Resource Docker-Util.robot +Resource CNAB_Util.robot Resource Helm-Util.robot Resource OVA-Util.robot Resource Cert-Util.robot diff --git a/tests/robot-cases/Group0-Util/bundle.json b/tests/robot-cases/Group0-Util/bundle.json new file mode 100644 index 000000000..9dddd5aee --- /dev/null +++ b/tests/robot-cases/Group0-Util/bundle.json @@ -0,0 +1 @@ +{"actions":{"io.cnab.status":{}},"definitions":{"port":{"default":"8080","type":"string"},"text":{"default":"Hello, World!","type":"string"}},"description":"Hello, World!","images":{"hello":{"contentDigest":"sha256:61d5cb94d7e546518a7bbd5bee06bfad0ecea8f56a75b084522a43dccbbcd845","description":"hello","image":"redis","imageType":"docker","mediaType":"application/vnd.docker.distribution.manifest.v2+json","size":528}},"invocationImages":[{"contentDigest":"sha256:61d5cb94d7e546518a7bbd5bee06bfad0ecea8f56a75b084522a43dccbbcd845","image":"busybox","imageType":"docker","mediaType":"application/vnd.docker.distribution.manifest.v2+json","size":941}],"maintainers":[{"email":"user@email.com","name":"user"}],"name":"hello-world","parameters":{"fields":{"definition":"","destination":null}},"schemaVersion":"v1.0.0","version":"0.1.0"} \ No newline at end of file diff --git a/tests/robot-cases/Group0-Util/cnab_push_bundle.sh b/tests/robot-cases/Group0-Util/cnab_push_bundle.sh new file mode 100755 index 000000000..c45df9969 --- /dev/null +++ b/tests/robot-cases/Group0-Util/cnab_push_bundle.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +IP=$1 +USER=$2 +PWD=$3 +TARGET=$4 +BUNDLE_FILE=$5 +echo $IP + +docker login $IP -u $USER -p $PWD +cnab-to-oci fixup $BUNDLE_FILE --target $TARGET --bundle fixup_bundle.json --auto-update-bundle +cnab-to-oci push fixup_bundle.json --target $TARGET --auto-update-bundle \ No newline at end of file diff --git a/tests/robot-cases/Group0-Util/docker_push_manifest_list.sh b/tests/robot-cases/Group0-Util/docker_push_manifest_list.sh new file mode 100755 index 000000000..db4dba452 --- /dev/null +++ b/tests/robot-cases/Group0-Util/docker_push_manifest_list.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +IP=$1 +USER=$2 +PWD=$3 +INDEX=$4 +IMAGE1=$5 +IMAGE2=$6 +echo $IP + +docker login $IP -u $USER -p $PWD + +cat /$HOME/.docker/config.json + +sed -i '$d' /$HOME/.docker/config.json +sed -i '$d' /$HOME/.docker/config.json +echo -e "\n },\n \"experimental\": \"enabled\"\n}" >> /$HOME/.docker/config.json + +cat /$HOME/.docker/config.json + +docker manifest create $INDEX $IMAGE1 $IMAGE2 +docker manifest push $INDEX diff --git a/tests/robot-cases/Group1-Nightly/Common.robot b/tests/robot-cases/Group1-Nightly/Common.robot index 0ef622e34..bf0e9c76a 100644 --- a/tests/robot-cases/Group1-Nightly/Common.robot +++ b/tests/robot-cases/Group1-Nightly/Common.robot @@ -1,686 +1,733 @@ - -// Copyright (c) 2017 VMware, Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -*** Settings *** -Documentation Harbor BATs -Resource ../../resources/Util.robot -Default Tags Nightly - -*** Variables *** -${HARBOR_URL} https://${ip} -${SSH_USER} root -${HARBOR_ADMIN} admin - -*** Test Cases *** -Test Case - Sign With Admin - Init Chrome Driver - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Close Browser - -Test Case - Create An New Project - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Create An New Project test${d} - Close Browser - -Test Case - Delete A Project - Init Chrome Driver - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Delete A Project Without Sign In Harbor - Close Browser - -Test Case - Repo Size - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} library alpine 2.6 2.6 - Go Into Project library - Go Into Repo alpine - Wait Until Page Contains 1.92MB - Close Browser - -Test Case - Staticsinfo - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - ${element}= Set Variable ${project_statistics_private_repository_icon} - Wait Until Element Is Visible ${element} - ${privaterepocount1}= Get Statics Private Repo - ${privateprojcount1}= Get Statics Private Project - ${publicrepocount1}= Get Statics Public Repo - ${publicprojcount1}= Get Statics Public Project - ${totalrepocount1}= Get Statics Total Repo - ${totalprojcount1}= Get Statics Total Project - Create An New Project private${d} - Create An New Project public${d} true - Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} private${d} hello-world - Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} public${d} hello-world - Reload Page - ${privateprojcount}= evaluate ${privateprojcount1}+1 - ${privaterepocount}= evaluate ${privaterepocount1}+1 - ${publicprojcount}= evaluate ${publicprojcount1}+1 - ${publicrepocount}= evaluate ${publicrepocount1}+1 - ${totalrepocount}= evaluate ${totalrepocount1}+2 - ${totalprojcount}= evaluate ${totalprojcount1}+2 - Navigate To Projects - Wait Until Element Is Visible ${element} - ${privaterepocountStr}= Convert To String ${privaterepocount} - Wait Until Element Contains ${element} ${privaterepocountStr} - ${privaterepocount2}= Get Statics Private Repo - ${privateprojcount2}= get statics private project - ${publicrepocount2}= get statics public repo - ${publicprojcount2}= get statics public project - ${totalrepocount2}= get statics total repo - ${totalprojcount2}= get statics total project - Should Be Equal As Integers ${privateprojcount2} ${privateprojcount} - Should be equal as integers ${privaterepocount2} ${privaterepocount} - Should be equal as integers ${publicprojcount2} ${publicprojcount} - Should be equal as integers ${publicrepocount2} ${publicrepocount} - Should be equal as integers ${totalprojcount2} ${totalprojcount} - Should be equal as integers ${totalrepocount2} ${totalrepocount} - -Test Case - Push Image - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Create An New Project test${d} - - Push image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} test${d} hello-world:latest - Go Into Project test${d} - Wait Until Page Contains test${d}/hello-world - -Test Case - Project Level Policy Public - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Create An New Project project${d} - Go Into Project project${d} has_image=${false} - Goto Project Config - Click Project Public - Save Project Config - # Verify - Public Should Be Selected - # Project${d} default should be private - # Here logout and login to try avoid a bug only in autotest - Logout Harbor - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Retry Double Keywords When Error Filter Project project${d} Project Should Be Public project${d} - Close Browser - -Test Case - Verify Download Ca Link - Init Chrome Driver - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Switch To System Settings - Page Should Contain Registry Root Certificate - Close Browser - -Test Case - Edit Email Settings - Init Chrome Driver - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - - Switch To Email - Config Email - - Logout Harbor - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - - Switch To Email - Verify Email - - Close Browser - -Test Case - Edit Token Expire - Init Chrome Driver - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Switch To System Settings - Modify Token Expiration 20 - Logout Harbor - - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Switch To System Settings - Token Must Be Match 20 - - #reset to default - Modify Token Expiration 30 - Close Browser - -Test Case - Create A New Labels - Init Chrome Driver - ${d}= Get Current Date - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Switch To System Labels - Create New Labels label_${d} - Close Browser - -Test Case - Update Label - Init Chrome Driver - ${d}= Get Current Date - - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Switch To System Labels - Create New Labels label_${d} - Sleep 3 - ${d1}= Get Current Date - Update A Label label_${d} - Close Browser - -Test Case - Delete Label - Init Chrome Driver - ${d}= Get Current Date - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Switch To System Labels - Create New Labels label_${d} - Sleep 3 - Delete A Label label_${d} - Close Browser - -Test Case - User View Projects - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - Sign In Harbor ${HARBOR_URL} user001 Test1@34 - Create An New Project test${d}1 - Create An New Project test${d}2 - Create An New Project test${d}3 - Switch To Log - Wait Until Page Contains test${d}1 - Wait Until Page Contains test${d}2 - Wait Until Page Contains test${d}3 - Close Browser - -Test Case - User View Logs - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - - Sign In Harbor ${HARBOR_URL} user002 Test1@34 - Create An New Project project${d} - - Push image ${ip} user002 Test1@34 project${d} busybox:latest - Pull image ${ip} user002 Test1@34 project${d} busybox:latest - - Go Into Project project${d} - Delete Repo project${d} - - Sleep 3 - - Go To Project Log - Advanced Search Should Display - - Do Log Advanced Search - Close Browser - -Test Case - Manage Project Member - Init Chrome Driver - ${user}= Set Variable user004 - ${pwd}= Set Variable Test1@34 - Sign In Harbor ${HARBOR_URL} ${user} ${pwd} - Manage Project Member Without Sign In Harbor ${user} ${pwd} - Close Browser - -Test Case - Manage project publicity - Body Of Manage project publicity - -Test Case - Assign Sys Admin - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - Sign In Harbor ${HARBOR_URL} user009 Test1@34 - Logout Harbor - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Switch to User Tag - Assign User Admin user009 - Logout Harbor - Sign In Harbor ${HARBOR_URL} user009 Test1@34 - Administration Tag Should Display - Close Browser - -Test Case - Edit Project Creation - # Create normal user and login - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - Sign In Harbor ${HARBOR_URL} user010 Test1@34 - Project Creation Should Display - Logout Harbor - - Sleep 3 - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Set Pro Create Admin Only - Logout Harbor - - Sign In Harbor ${HARBOR_URL} user010 Test1@34 - Project Creation Should Not Display - Logout Harbor - - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Set Pro Create Every One - Close browser - -Test Case - Edit Repo Info - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - - Sign In Harbor ${HARBOR_URL} user011 Test1@34 - Create An New Project project${d} - Push Image ${ip} user011 Test1@34 project${d} hello-world - Go Into Project project${d} - Go Into Repo project${d}/hello-world - Edit Repo Info - Close Browser - -Test Case - Delete Multi Project - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - - Sign In Harbor ${HARBOR_URL} user012 Test1@34 - Create An New Project projecta${d} - Create An New Project projectb${d} - Push Image ${ip} user012 Test1@34 projecta${d} hello-world - Navigate To Projects - Filter Object project - Retry Wait Element Not Visible //clr-datagrid/div/div[2] - @{project_list} Create List projecta projectb - Multi-delete Object ${project_delete_btn} @{project_list} - # Verify delete project with image should not be deleted directly - Delete Fail projecta${d} - Delete Success projectb${d} - Close Browser - -Test Case - Delete Multi Repo - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - - Sign In Harbor ${HARBOR_URL} user013 Test1@34 - Create An New Project project${d} - Push Image ${ip} user013 Test1@34 project${d} hello-world - Push Image ${ip} user013 Test1@34 project${d} busybox - Sleep 2 - Go Into Project project${d} - @{repo_list} Create List hello-world busybox - Multi-delete Object ${repo_delete_btn} @{repo_list} - # Verify - Delete Success hello-world busybox - Close Browser - -Test Case - Delete Multi Artifacts - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - Sign In Harbor ${HARBOR_URL} user014 Test1@34 - Create An New Project project${d} - Push Image With Tag ${ip} user014 Test1@34 project${d} redis 3.2.10-alpine 3.2.10-alpine - Push Image With Tag ${ip} user014 Test1@34 project${d} redis 4.0.7-alpine 4.0.7-alpine - Go Into Project project${d} - Go Into Repo redis - @{tag_list} Create List 3.2.10-alpine 4.0.7-alpine - Multi-delete Artifact ${tag_delete_btn} @{tag_list} - # Verify - Delete Success sha256:dd179737 sha256:28a85227 - Close Browser - -Test Case - Delete Repo on CardView - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - Sign In Harbor ${HARBOR_URL} user015 Test1@34 - Create An New Project project${d} - Push Image ${ip} user015 Test1@34 project${d} hello-world - Push Image ${ip} user015 Test1@34 project${d} busybox - Go Into Project project${d} - Switch To CardView - Delete Repo on CardView busybox - # Verify - Delete Success busybox - Close Browser - -Test Case - Delete Multi Member - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - Sign In Harbor ${HARBOR_URL} user016 Test1@34 - Create An New Project project${d} - Go Into Project project${d} has_image=${false} - Switch To Member - Add Guest Member To Project user017 - Add Guest Member To Project user018 - Multi-delete Member user017 user018 - Delete Success user017 user018 - Close Browser - -Test Case - Project Admin Operate Labels - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - Sign In Harbor ${HARBOR_URL} user019 Test1@34 - Create An New Project project${d} - Go Into Project project${d} has_image=${false} - Sleep 2 - # Add labels - Switch To Project Label - Create New Labels label_${d} - Sleep 2 - Update A Label label_${d} - Sleep 2 - Delete A Label label_${d} - Close Browser - -Test Case - Project Admin Add Labels To Repo - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - Sign In Harbor ${HARBOR_URL} user020 Test1@34 - Create An New Project project${d} - Push Image With Tag ${ip} user020 Test1@34 project${d} redis 3.2.10-alpine 3.2.10-alpine - Push Image With Tag ${ip} user020 Test1@34 project${d} redis 4.0.7-alpine 4.0.7-alpine - Go Into Project project${d} - Sleep 2 - # Add labels - Switch To Project Label - Create New Labels label111 - Create New Labels label22 - Sleep 2 - Switch To Project Repo - Go Into Repo project${d}/redis - Add Labels To Tag 3.2.10-alpine label111 - Add Labels To Tag 4.0.7-alpine label22 - Filter Labels In Tags label111 label22 - Close Browser - -Test Case - Developer Operate Labels - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - - Sign In Harbor ${HARBOR_URL} user021 Test1@34 - Create An New Project project${d} - Logout Harbor - - Manage Project Member user021 Test1@34 project${d} user022 Add ${false} - Change User Role In Project user021 Test1@34 project${d} user022 Developer - - Sign In Harbor ${HARBOR_URL} user022 Test1@34 - Go Into Project project${d} has_image=${false} - Sleep 3 - Retry Wait Until Page Not Contains Element xpath=//a[contains(.,'Labels')] - Close Browser - -Test Case - Copy A Image - Init Chrome Driver - ${random_num1}= Get Current Date result_format=%m%s - ${random_num2}= Evaluate str(random.randint(1000,9999)) modules=random - - Sign In Harbor ${HARBOR_URL} user028 Test1@34 - Create An New Project project${random_num1} - Create An New Project project${random_num1}${random_num2} - - Go Into Project project${random_num1} has_image=${false} - Sleep 1 - Push Image With Tag ${ip} user028 Test1@34 project${random_num1} redis ${image_tag} - Sleep 1 - Go Into Repo project${random_num1}/redis - Copy Image ${image_tag} project${random_num1}${random_num2} ${target_image_name} - Retry Wait Element Not Visible ${repo_retag_confirm_dlg} - Navigate To Projects - Go Into Project project${random_num1}${random_num2} - Sleep 1 - Page Should Contain ${target_image_name} - Go Into Repo project${random_num1}${random_num2}/${target_image_name} - Sleep 1 - Retry Wait Until Page Contains Element xpath=${tag_value_xpath} - Close Browser - -Test Case - Create An New Project With Quotas Set - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - ${count_quota}= Set Variable 1234 - ${storage_quota}= Set Variable 600 - ${storage_quota_unit}= Set Variable GB - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Create An New Project project${d} count_quota=${count_quota} storage_quota=${storage_quota} storage_quota_unit=${storage_quota_unit} - ${count_quota_ret}= Get Project Count Quota Text From Project Quotas List project${d} - Should Be Equal As Strings ${count_quota_ret} 0 of ${count_quota} - ${storage_quota_ret}= Get Project Storage Quota Text From Project Quotas List project${d} - Should Be Equal As Strings ${storage_quota_ret} 0Byte of ${storage_quota}${storage_quota_unit} - Close Browser - -Test Case - Project Image And Chart Artifact Count Quotas Dispaly And Control - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - ${count_quota}= Set Variable 2 - ${storage_quota}= Set Variable 500 - ${storage_quota_unit}= Set Variable MB - ${image}= Set Variable redis - #For docker-hub registry - #${sha256}= Set Variable 9755880356c4ced4ff7745bafe620f0b63dd17747caedba72504ef7bac882089 - #For internal CPE harbor registry - ${sha256}= Set Variable 0e67625224c1da47cb3270e7a861a83e332f708d3d89dde0cbed432c94824d9a - - ${image_size}= Set Variable 34.14MB - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Create An New Project project${d} count_quota=${count_quota} storage_quota=${storage_quota} storage_quota_unit=${storage_quota_unit} - Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} ${image} sha256=${sha256} - ${count_quota_ret}= Get Project Count Quota Text From Project Quotas List project${d} - Should Be Equal As Strings ${count_quota_ret} 1 of ${count_quota} - ${storage_quota_ret}= Get Project Storage Quota Text From Project Quotas List project${d} - Should Be Equal As Strings ${storage_quota_ret} ${image_size} of ${storage_quota}${storage_quota_unit} - #Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} alpine - Go Into Project project${d} - Switch To Project Charts - Upload Chart files - Cannot Push image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} busybox err_msg=Quota exceeded when processing the request of adding 1 of count resource, which when updated to current usage of 2 will exceed the configured upper limit of 2 - ${count_quota_ret}= Get Project Count Quota Text From Project Quotas List project${d} - Should Be Equal As Strings ${count_quota_ret} 2 of ${count_quota} - Go Into Project project${d} - Delete Repo project${d}/${image} - ${count_quota_ret}= Get Project Count Quota Text From Project Quotas List project${d} - Should Be Equal As Strings ${count_quota_ret} 1 of ${count_quota} - Push image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} busybox - Close Browser - -# Make sure image logstash was pushed to harbor for the 1st time, so GC will delete it. -Test Case - Project Quotas Control Under GC - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - ${storage_quota}= Set Variable 200 - ${storage_quota_unit}= Set Variable MB - ${image_a}= Set Variable logstash - ${image_a_size}= Set Variable 321.03MB - ${image_a_ver}= Set Variable 6.8.3 - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Capture Page Screenshot - Create An New Project project${d} storage_quota=${storage_quota} storage_quota_unit=${storage_quota_unit} - Capture Page Screenshot - Cannot Push image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} ${image_a}:${image_a_ver} err_msg=will exceed the configured upper limit of 200.0 MiB - Capture Page Screenshot - GC Now ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - @{param} Create List project${d} - Retry Keyword When Return Value Mismatch Get Project Storage Quota Text From Project Quotas List 0Byte of ${storage_quota}${storage_quota_unit} 60 @{param} - Close Browser - -Test Case - Project Storage Quotas Dispaly And Control - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - ${storage_quota}= Set Variable 330 - ${storage_quota_unit}= Set Variable MB - ${image_a}= Set Variable redis - ${image_b}= Set Variable logstash - ${image_a_size}= Set Variable 34.15MB - ${image_b_size}= Set Variable 321.03MB - ${image_a_ver}= Set Variable donotremove5.0 - ${image_b_ver}= Set Variable do_not_remove_6.8.3 - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Create An New Project project${d} storage_quota=${storage_quota} storage_quota_unit=${storage_quota_unit} - Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} ${image_b} tag=${image_b_ver} tag1=${image_b_ver} - ${storage_quota_ret}= Get Project Storage Quota Text From Project Quotas List project${d} - Should Be Equal As Strings ${storage_quota_ret} ${image_b_size} of ${storage_quota}${storage_quota_unit} - Cannot Push image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} ${image_a}:${image_a_ver} err_msg=Quota exceeded when processing the request of adding 25.8 MiB of storage resource, which when updated to current usage of 329.3 MiB will exceed the configured upper limit of 330.0 MiB - Go Into Project project${d} - Delete Repo project${d}/${image_b} - Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} ${image_a} tag=${image_a_ver} tag1=${image_a_ver} - ${storage_quota_ret}= Get Project Storage Quota Text From Project Quotas List project${d} - ${storage_quota_ret_str_left} Fetch From Left ${storage_quota_ret} 25. - Log ${storage_quota_ret_str_left} - ${storage_quota_ret_str_right} Fetch From Left ${storage_quota_ret} 25. - Log ${storage_quota_ret_str_right} - Log ${storage_quota_ret_str_left}${storage_quota_ret_str_right} - Should Be Equal As Strings ${storage_quota_ret} ${image_a_size} of ${storage_quota}${storage_quota_unit} - Close Browser - -Test Case - Project Quotas Control Under Copy - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - ${count_quota}= Set Variable 1 - ${image_a}= Set Variable redis - ${image_b}= Set Variable logstash - ${image_a_ver}= Set Variable 5.0 - ${image_b_ver}= Set Variable 6.8.3 - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Create An New Project project_a_${d} - Create An New Project project_b_${d} count_quota=${count_quota} - Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project_a_${d} ${image_a} tag=${image_a_ver} tag1=${image_a_ver} - Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project_a_${d} ${image_b} tag=${image_b_ver} tag1=${image_b_ver} - Go Into Project project_a_${d} - Go Into Repo project_a_${d}/${image_a} - Copy Image ${image_a_ver} project_b_${d} ${image_a} - Retry Wait Element Not Visible ${repo_retag_confirm_dlg} - Go Into Project project_a_${d} - Go Into Repo project_a_${d}/${image_b} - Copy Image ${image_b_ver} project_b_${d} ${image_b} - Retry Wait Element Not Visible ${repo_retag_confirm_dlg} - Sleep 2 - Go Into Project project_b_${d} - Sleep 2 - Capture Page Screenshot - Retry Wait Until Page Contains Element xpath=//clr-dg-cell[contains(.,'${image_a}')]/a - Retry Wait Until Page Not Contains Element xpath=//clr-dg-cell[contains(.,'${image_b}')]/a - Capture Page Screenshot - Close Browser - -Test Case - Create New Webhook - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Create An New Project project${d} - Go Into Project project${d} has_image=${false} - Switch To Project Webhooks - Create A New Webhook ${HARBOR_URL} auth_header=auth_header${d} - Close Browser - -Test Case - Update Webhook - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Create An New Project project${d} - Go Into Project project${d} has_image=${false} - Switch To Project Webhooks - Create A New Webhook ${HARBOR_URL} auth_header=auth_header${d} - Sleep 3 - ${d1}= Get Current Date - Update A Webhook 101.17.109.20 auth_header=auth_header${d1} - Close Browser - -Test Case - Toggle Enable/Disable State of Webhook - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Create An New Project project${d} - Go Into Project project${d} has_image=${false} - Switch To Project Webhooks - Create A New Webhook ${HARBOR_URL} auth_header=auth_header${d} - Sleep 3 - Toggle Enable/Disable State of Same Webhook - Close Browser - -Test Case - Tag Retention - Init Chrome Driver - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - ${d}= Get Current Date result_format=%m%s - Create An New Project project${d} - Switch To Tag Retention - Add A Tag Retention Rule - Delete A Tag Retention Rule - Add A Tag Retention Rule - Edit A Tag Retention Rule ** latest - Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} hello-world latest - Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} memcached 123 - Set Daily Schedule - Execute Dry Run - Execute Run - Close Browser - -Test Case - Tag Immutability - Init Chrome Driver - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - ${d}= Get Current Date result_format=%m%s - Create An New Project project${d} - Go Into Project project${d} has_image=${false} - Switch To Tag Immutability - Add A Tag Immutability Rule 1212 3434 - Delete A Tag Immutability Rule - Add A Tag Immutability Rule 5566 7788 - Edit A Tag Immutability Rule hello-world latest - Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} hello-world latest - Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} busybox latest - Go Into Project project${d} - @{repo_list} Create List hello-world busybox - Multi-delete Object ${repo_delete_btn} @{repo_list} - # Verify - Delete Fail hello-world - Delete Success busybox - Close Browser - - -Test Case - Robot Account - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Create An New Project project${d} - ${token}= Create A Robot Account And Return Token project${d} robot${d} - Log To Console ${token} - Log ${token} - Push image ${ip} robot${d} ${token} project${d} hello-world:latest is_robot=${true} - Pull image ${ip} robot${d} ${token} project${d} hello-world:latest is_robot=${true} - -Test Case - Read Only Mode - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Create An New Project project${d} - - Enable Read Only - Cannot Push image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} busybox:latest - - Disable Read Only - Sleep 5 - Push image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} busybox:latest - Close Browser - -Test Case - Can Not Copy Image In ReadOnly Mode - Init Chrome Driver - ${random_num1}= Get Current Date result_format=%m%s - ${random_num2}= Evaluate str(random.randint(1000,9999)) modules=random - - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - Create An New Project project${random_num1} - Create An New Project project${random_num1}${random_num2} - - Go Into Project project${random_num1} has_image=${false} - Sleep 1 - Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${random_num1} redis ${image_tag} - Sleep 1 - Enable Read Only - Go Into Repo project${random_num1}/redis - Copy Image ${image_tag} project${random_num1}${random_num2} ${target_image_name} - Retry Wait Element Not Visible ${repo_retag_confirm_dlg} - Navigate To Projects - Go Into Project project${random_num1}${random_num2} has_image=${false} - Sleep 10 - Go Into Project project${random_num1}${random_num2} has_image=${false} - Disable Read Only - Close Browser - - + +// Copyright (c) 2017 VMware, Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +*** Settings *** +Documentation Harbor BATs +Resource ../../resources/Util.robot +Default Tags Nightly + +*** Variables *** +${HARBOR_URL} https://${ip} +${SSH_USER} root +${HARBOR_ADMIN} admin + +*** Test Cases *** +Test Case - Sign With Admin + Init Chrome Driver + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Close Browser + +Test Case - Create An New Project + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Create An New Project test${d} + Close Browser + +Test Case - Delete A Project + Init Chrome Driver + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Delete A Project Without Sign In Harbor + Close Browser + +Test Case - Repo Size + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} library alpine 2.6 2.6 + Go Into Project library + Go Into Repo alpine + Wait Until Page Contains 1.92MB + Close Browser + +Test Case - Staticsinfo + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + ${element}= Set Variable ${project_statistics_private_repository_icon} + Wait Until Element Is Visible ${element} + ${privaterepocount1}= Get Statics Private Repo + ${privateprojcount1}= Get Statics Private Project + ${publicrepocount1}= Get Statics Public Repo + ${publicprojcount1}= Get Statics Public Project + ${totalrepocount1}= Get Statics Total Repo + ${totalprojcount1}= Get Statics Total Project + Create An New Project private${d} + Create An New Project public${d} true + Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} private${d} hello-world + Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} public${d} hello-world + Reload Page + ${privateprojcount}= evaluate ${privateprojcount1}+1 + ${privaterepocount}= evaluate ${privaterepocount1}+1 + ${publicprojcount}= evaluate ${publicprojcount1}+1 + ${publicrepocount}= evaluate ${publicrepocount1}+1 + ${totalrepocount}= evaluate ${totalrepocount1}+2 + ${totalprojcount}= evaluate ${totalprojcount1}+2 + Navigate To Projects + Wait Until Element Is Visible ${element} + ${privaterepocountStr}= Convert To String ${privaterepocount} + Wait Until Element Contains ${element} ${privaterepocountStr} + ${privaterepocount2}= Get Statics Private Repo + ${privateprojcount2}= get statics private project + ${publicrepocount2}= get statics public repo + ${publicprojcount2}= get statics public project + ${totalrepocount2}= get statics total repo + ${totalprojcount2}= get statics total project + Should Be Equal As Integers ${privateprojcount2} ${privateprojcount} + Should be equal as integers ${privaterepocount2} ${privaterepocount} + Should be equal as integers ${publicprojcount2} ${publicprojcount} + Should be equal as integers ${publicrepocount2} ${publicrepocount} + Should be equal as integers ${totalprojcount2} ${totalprojcount} + Should be equal as integers ${totalrepocount2} ${totalrepocount} + +Test Case - Push Image + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Create An New Project test${d} + + Push image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} test${d} hello-world:latest + Go Into Project test${d} + Wait Until Page Contains test${d}/hello-world + +Test Case - Project Level Policy Public + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Create An New Project project${d} + Go Into Project project${d} has_image=${false} + Goto Project Config + Click Project Public + Save Project Config + # Verify + Public Should Be Selected + # Project${d} default should be private + # Here logout and login to try avoid a bug only in autotest + Logout Harbor + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Retry Double Keywords When Error Filter Project project${d} Project Should Be Public project${d} + Close Browser + +Test Case - Verify Download Ca Link + Init Chrome Driver + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Switch To System Settings + Page Should Contain Registry Root Certificate + Close Browser + +Test Case - Edit Email Settings + Init Chrome Driver + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + + Switch To Email + Config Email + + Logout Harbor + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + + Switch To Email + Verify Email + + Close Browser + +Test Case - Edit Token Expire + Init Chrome Driver + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Switch To System Settings + Modify Token Expiration 20 + Logout Harbor + + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Switch To System Settings + Token Must Be Match 20 + + #reset to default + Modify Token Expiration 30 + Close Browser + +Test Case - Create A New Labels + Init Chrome Driver + ${d}= Get Current Date + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Switch To System Labels + Create New Labels label_${d} + Close Browser + +Test Case - Update Label + Init Chrome Driver + ${d}= Get Current Date + + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Switch To System Labels + Create New Labels label_${d} + Sleep 3 + ${d1}= Get Current Date + Update A Label label_${d} + Close Browser + +Test Case - Delete Label + Init Chrome Driver + ${d}= Get Current Date + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Switch To System Labels + Create New Labels label_${d} + Sleep 3 + Delete A Label label_${d} + Close Browser + +Test Case - User View Projects + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + Sign In Harbor ${HARBOR_URL} user001 Test1@34 + Create An New Project test${d}1 + Create An New Project test${d}2 + Create An New Project test${d}3 + Switch To Log + Wait Until Page Contains test${d}1 + Wait Until Page Contains test${d}2 + Wait Until Page Contains test${d}3 + Close Browser + +Test Case - User View Logs + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + + Sign In Harbor ${HARBOR_URL} user002 Test1@34 + Create An New Project project${d} + + Push image ${ip} user002 Test1@34 project${d} busybox:latest + Pull image ${ip} user002 Test1@34 project${d} busybox:latest + + Go Into Project project${d} + Delete Repo project${d} + + Sleep 3 + + Go To Project Log + Advanced Search Should Display + + Do Log Advanced Search + Close Browser + +Test Case - Manage Project Member + Init Chrome Driver + ${user}= Set Variable user004 + ${pwd}= Set Variable Test1@34 + Sign In Harbor ${HARBOR_URL} ${user} ${pwd} + Manage Project Member Without Sign In Harbor ${user} ${pwd} + Close Browser + +Test Case - Manage project publicity + Body Of Manage project publicity + +Test Case - Assign Sys Admin + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + Sign In Harbor ${HARBOR_URL} user009 Test1@34 + Logout Harbor + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Switch to User Tag + Assign User Admin user009 + Logout Harbor + Sign In Harbor ${HARBOR_URL} user009 Test1@34 + Administration Tag Should Display + Close Browser + +Test Case - Edit Project Creation + # Create normal user and login + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + Sign In Harbor ${HARBOR_URL} user010 Test1@34 + Project Creation Should Display + Logout Harbor + + Sleep 3 + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Set Pro Create Admin Only + Logout Harbor + + Sign In Harbor ${HARBOR_URL} user010 Test1@34 + Project Creation Should Not Display + Logout Harbor + + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Set Pro Create Every One + Close browser + +Test Case - Edit Repo Info + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + + Sign In Harbor ${HARBOR_URL} user011 Test1@34 + Create An New Project project${d} + Push Image ${ip} user011 Test1@34 project${d} hello-world + Go Into Project project${d} + Go Into Repo project${d}/hello-world + Edit Repo Info + Close Browser + +Test Case - Delete Multi Project + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + + Sign In Harbor ${HARBOR_URL} user012 Test1@34 + Create An New Project projecta${d} + Create An New Project projectb${d} + Push Image ${ip} user012 Test1@34 projecta${d} hello-world + Navigate To Projects + Filter Object project + Retry Wait Element Not Visible //clr-datagrid/div/div[2] + @{project_list} Create List projecta projectb + Multi-delete Object ${project_delete_btn} @{project_list} + # Verify delete project with image should not be deleted directly + Delete Fail projecta${d} + Delete Success projectb${d} + Close Browser + +Test Case - Delete Multi Repo + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + + Sign In Harbor ${HARBOR_URL} user013 Test1@34 + Create An New Project project${d} + Push Image ${ip} user013 Test1@34 project${d} hello-world + Push Image ${ip} user013 Test1@34 project${d} busybox + Sleep 2 + Go Into Project project${d} + @{repo_list} Create List hello-world busybox + Multi-delete Object ${repo_delete_btn} @{repo_list} + # Verify + Delete Success hello-world busybox + Close Browser + +Test Case - Delete Multi Artifacts + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + Sign In Harbor ${HARBOR_URL} user014 Test1@34 + Create An New Project project${d} + Push Image With Tag ${ip} user014 Test1@34 project${d} redis 3.2.10-alpine 3.2.10-alpine + Push Image With Tag ${ip} user014 Test1@34 project${d} redis 4.0.7-alpine 4.0.7-alpine + Go Into Project project${d} + Go Into Repo redis + @{tag_list} Create List 3.2.10-alpine 4.0.7-alpine + Multi-delete Artifact ${tag_delete_btn} @{tag_list} + # Verify + Delete Success sha256:dd179737 sha256:28a85227 + Close Browser + +Test Case - Delete Repo on CardView + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + Sign In Harbor ${HARBOR_URL} user015 Test1@34 + Create An New Project project${d} + Push Image ${ip} user015 Test1@34 project${d} hello-world + Push Image ${ip} user015 Test1@34 project${d} busybox + Go Into Project project${d} + Switch To CardView + Delete Repo on CardView busybox + # Verify + Delete Success busybox + Close Browser + +Test Case - Delete Multi Member + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + Sign In Harbor ${HARBOR_URL} user016 Test1@34 + Create An New Project project${d} + Go Into Project project${d} has_image=${false} + Switch To Member + Add Guest Member To Project user017 + Add Guest Member To Project user018 + Multi-delete Member user017 user018 + Delete Success user017 user018 + Close Browser + +Test Case - Project Admin Operate Labels + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + Sign In Harbor ${HARBOR_URL} user019 Test1@34 + Create An New Project project${d} + Go Into Project project${d} has_image=${false} + Sleep 2 + # Add labels + Switch To Project Label + Create New Labels label_${d} + Sleep 2 + Update A Label label_${d} + Sleep 2 + Delete A Label label_${d} + Close Browser + +Test Case - Project Admin Add Labels To Repo + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + Sign In Harbor ${HARBOR_URL} user020 Test1@34 + Create An New Project project${d} + Push Image With Tag ${ip} user020 Test1@34 project${d} redis 3.2.10-alpine 3.2.10-alpine + Push Image With Tag ${ip} user020 Test1@34 project${d} redis 4.0.7-alpine 4.0.7-alpine + Go Into Project project${d} + Sleep 2 + # Add labels + Switch To Project Label + Create New Labels label111 + Create New Labels label22 + Sleep 2 + Switch To Project Repo + Go Into Repo project${d}/redis + Add Labels To Tag 3.2.10-alpine label111 + Add Labels To Tag 4.0.7-alpine label22 + Filter Labels In Tags label111 label22 + Close Browser + +Test Case - Developer Operate Labels + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + + Sign In Harbor ${HARBOR_URL} user021 Test1@34 + Create An New Project project${d} + Logout Harbor + + Manage Project Member user021 Test1@34 project${d} user022 Add ${false} + Change User Role In Project user021 Test1@34 project${d} user022 Developer + + Sign In Harbor ${HARBOR_URL} user022 Test1@34 + Go Into Project project${d} has_image=${false} + Sleep 3 + Retry Wait Until Page Not Contains Element xpath=//a[contains(.,'Labels')] + Close Browser + +Test Case - Copy A Image + Init Chrome Driver + ${random_num1}= Get Current Date result_format=%m%s + ${random_num2}= Evaluate str(random.randint(1000,9999)) modules=random + + Sign In Harbor ${HARBOR_URL} user028 Test1@34 + Create An New Project project${random_num1} + Create An New Project project${random_num1}${random_num2} + + Go Into Project project${random_num1} has_image=${false} + Sleep 1 + Push Image With Tag ${ip} user028 Test1@34 project${random_num1} redis ${image_tag} + Sleep 1 + Go Into Repo project${random_num1}/redis + Copy Image ${image_tag} project${random_num1}${random_num2} ${target_image_name} + Retry Wait Element Not Visible ${repo_retag_confirm_dlg} + Navigate To Projects + Go Into Project project${random_num1}${random_num2} + Sleep 1 + Page Should Contain ${target_image_name} + Go Into Repo project${random_num1}${random_num2}/${target_image_name} + Sleep 1 + Retry Wait Until Page Contains Element xpath=${tag_value_xpath} + Close Browser + +Test Case - Create An New Project With Quotas Set + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + ${count_quota}= Set Variable 1234 + ${storage_quota}= Set Variable 600 + ${storage_quota_unit}= Set Variable GB + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Create An New Project project${d} count_quota=${count_quota} storage_quota=${storage_quota} storage_quota_unit=${storage_quota_unit} + ${count_quota_ret}= Get Project Count Quota Text From Project Quotas List project${d} + Should Be Equal As Strings ${count_quota_ret} 0 of ${count_quota} + ${storage_quota_ret}= Get Project Storage Quota Text From Project Quotas List project${d} + Should Be Equal As Strings ${storage_quota_ret} 0Byte of ${storage_quota}${storage_quota_unit} + Close Browser + +Test Case - Project Image And Chart Artifact Count Quotas Dispaly And Control + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + ${count_quota}= Set Variable 2 + ${storage_quota}= Set Variable 500 + ${storage_quota_unit}= Set Variable MB + ${image}= Set Variable redis + #For docker-hub registry + #${sha256}= Set Variable 9755880356c4ced4ff7745bafe620f0b63dd17747caedba72504ef7bac882089 + #For internal CPE harbor registry + ${sha256}= Set Variable 0e67625224c1da47cb3270e7a861a83e332f708d3d89dde0cbed432c94824d9a + + ${image_size}= Set Variable 34.14MB + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Create An New Project project${d} count_quota=${count_quota} storage_quota=${storage_quota} storage_quota_unit=${storage_quota_unit} + Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} ${image} sha256=${sha256} + ${count_quota_ret}= Get Project Count Quota Text From Project Quotas List project${d} + Should Be Equal As Strings ${count_quota_ret} 1 of ${count_quota} + ${storage_quota_ret}= Get Project Storage Quota Text From Project Quotas List project${d} + Should Be Equal As Strings ${storage_quota_ret} ${image_size} of ${storage_quota}${storage_quota_unit} + #Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} alpine + Go Into Project project${d} + Switch To Project Charts + Upload Chart files + Cannot Push image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} busybox err_msg=Quota exceeded when processing the request of adding 1 of count resource, which when updated to current usage of 2 will exceed the configured upper limit of 2 + ${count_quota_ret}= Get Project Count Quota Text From Project Quotas List project${d} + Should Be Equal As Strings ${count_quota_ret} 2 of ${count_quota} + Go Into Project project${d} + Delete Repo project${d}/${image} + ${count_quota_ret}= Get Project Count Quota Text From Project Quotas List project${d} + Should Be Equal As Strings ${count_quota_ret} 1 of ${count_quota} + Push image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} busybox + Close Browser + +# Make sure image logstash was pushed to harbor for the 1st time, so GC will delete it. +Test Case - Project Quotas Control Under GC + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + ${storage_quota}= Set Variable 200 + ${storage_quota_unit}= Set Variable MB + ${image_a}= Set Variable logstash + ${image_a_size}= Set Variable 321.03MB + ${image_a_ver}= Set Variable 6.8.3 + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Capture Page Screenshot + Create An New Project project${d} storage_quota=${storage_quota} storage_quota_unit=${storage_quota_unit} + Capture Page Screenshot + Cannot Push image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} ${image_a}:${image_a_ver} err_msg=will exceed the configured upper limit of 200.0 MiB + Capture Page Screenshot + GC Now ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + @{param} Create List project${d} + Retry Keyword When Return Value Mismatch Get Project Storage Quota Text From Project Quotas List 0Byte of ${storage_quota}${storage_quota_unit} 60 @{param} + Close Browser + +Test Case - Project Storage Quotas Dispaly And Control + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + ${storage_quota}= Set Variable 330 + ${storage_quota_unit}= Set Variable MB + ${image_a}= Set Variable redis + ${image_b}= Set Variable logstash + ${image_a_size}= Set Variable 34.15MB + ${image_b_size}= Set Variable 321.03MB + ${image_a_ver}= Set Variable donotremove5.0 + ${image_b_ver}= Set Variable do_not_remove_6.8.3 + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Create An New Project project${d} storage_quota=${storage_quota} storage_quota_unit=${storage_quota_unit} + Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} ${image_b} tag=${image_b_ver} tag1=${image_b_ver} + ${storage_quota_ret}= Get Project Storage Quota Text From Project Quotas List project${d} + Should Be Equal As Strings ${storage_quota_ret} ${image_b_size} of ${storage_quota}${storage_quota_unit} + Cannot Push image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} ${image_a}:${image_a_ver} err_msg=Quota exceeded when processing the request of adding 25.8 MiB of storage resource, which when updated to current usage of 329.3 MiB will exceed the configured upper limit of 330.0 MiB + Go Into Project project${d} + Delete Repo project${d}/${image_b} + Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} ${image_a} tag=${image_a_ver} tag1=${image_a_ver} + ${storage_quota_ret}= Get Project Storage Quota Text From Project Quotas List project${d} + ${storage_quota_ret_str_left} Fetch From Left ${storage_quota_ret} 25. + Log ${storage_quota_ret_str_left} + ${storage_quota_ret_str_right} Fetch From Left ${storage_quota_ret} 25. + Log ${storage_quota_ret_str_right} + Log ${storage_quota_ret_str_left}${storage_quota_ret_str_right} + Should Be Equal As Strings ${storage_quota_ret} ${image_a_size} of ${storage_quota}${storage_quota_unit} + Close Browser + +Test Case - Project Quotas Control Under Copy + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + ${count_quota}= Set Variable 1 + ${image_a}= Set Variable redis + ${image_b}= Set Variable logstash + ${image_a_ver}= Set Variable 5.0 + ${image_b_ver}= Set Variable 6.8.3 + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Create An New Project project_a_${d} + Create An New Project project_b_${d} count_quota=${count_quota} + Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project_a_${d} ${image_a} tag=${image_a_ver} tag1=${image_a_ver} + Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project_a_${d} ${image_b} tag=${image_b_ver} tag1=${image_b_ver} + Go Into Project project_a_${d} + Go Into Repo project_a_${d}/${image_a} + Copy Image ${image_a_ver} project_b_${d} ${image_a} + Retry Wait Element Not Visible ${repo_retag_confirm_dlg} + Go Into Project project_a_${d} + Go Into Repo project_a_${d}/${image_b} + Copy Image ${image_b_ver} project_b_${d} ${image_b} + Retry Wait Element Not Visible ${repo_retag_confirm_dlg} + Sleep 2 + Go Into Project project_b_${d} + Sleep 2 + Capture Page Screenshot + Retry Wait Until Page Contains Element xpath=//clr-dg-cell[contains(.,'${image_a}')]/a + Retry Wait Until Page Not Contains Element xpath=//clr-dg-cell[contains(.,'${image_b}')]/a + Capture Page Screenshot + Close Browser + +Test Case - Create New Webhook + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Create An New Project project${d} + Go Into Project project${d} has_image=${false} + Switch To Project Webhooks + Create A New Webhook ${HARBOR_URL} auth_header=auth_header${d} + Close Browser + +Test Case - Update Webhook + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Create An New Project project${d} + Go Into Project project${d} has_image=${false} + Switch To Project Webhooks + Create A New Webhook ${HARBOR_URL} auth_header=auth_header${d} + Sleep 3 + ${d1}= Get Current Date + Update A Webhook 101.17.109.20 auth_header=auth_header${d1} + Close Browser + +Test Case - Toggle Enable/Disable State of Webhook + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Create An New Project project${d} + Go Into Project project${d} has_image=${false} + Switch To Project Webhooks + Create A New Webhook ${HARBOR_URL} auth_header=auth_header${d} + Sleep 3 + Toggle Enable/Disable State of Same Webhook + Close Browser + +Test Case - Tag Retention + Init Chrome Driver + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + ${d}= Get Current Date result_format=%m%s + Create An New Project project${d} + Switch To Tag Retention + Add A Tag Retention Rule + Delete A Tag Retention Rule + Add A Tag Retention Rule + Edit A Tag Retention Rule ** latest + Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} hello-world latest + Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} memcached 123 + Set Daily Schedule + Execute Dry Run + Execute Run + Close Browser + +Test Case - Tag Immutability + Init Chrome Driver + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + ${d}= Get Current Date result_format=%m%s + Create An New Project project${d} + Go Into Project project${d} has_image=${false} + Switch To Tag Immutability + Add A Tag Immutability Rule 1212 3434 + Delete A Tag Immutability Rule + Add A Tag Immutability Rule 5566 7788 + Edit A Tag Immutability Rule hello-world latest + Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} hello-world latest + Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} busybox latest + Go Into Project project${d} + @{repo_list} Create List hello-world busybox + Multi-delete Object ${repo_delete_btn} @{repo_list} + # Verify + Delete Fail hello-world + Delete Success busybox + Close Browser + + +Test Case - Robot Account + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Create An New Project project${d} + ${token}= Create A Robot Account And Return Token project${d} robot${d} + Log To Console ${token} + Log ${token} + Push image ${ip} robot${d} ${token} project${d} hello-world:latest is_robot=${true} + Pull image ${ip} robot${d} ${token} project${d} hello-world:latest is_robot=${true} + +Test Case - Read Only Mode + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Create An New Project project${d} + + Enable Read Only + Cannot Push image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} busybox:latest + + Disable Read Only + Sleep 5 + Push image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} busybox:latest + Close Browser + +Test Case - Can Not Copy Image In ReadOnly Mode + Init Chrome Driver + ${random_num1}= Get Current Date result_format=%m%s + ${random_num2}= Evaluate str(random.randint(1000,9999)) modules=random + + Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} + Create An New Project project${random_num1} + Create An New Project project${random_num1}${random_num2} + + Go Into Project project${random_num1} has_image=${false} + Sleep 1 + Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${random_num1} redis ${image_tag} + Sleep 1 + Enable Read Only + Go Into Repo project${random_num1}/redis + Copy Image ${image_tag} project${random_num1}${random_num2} ${target_image_name} + Retry Wait Element Not Visible ${repo_retag_confirm_dlg} + Navigate To Projects + Go Into Project project${random_num1}${random_num2} has_image=${false} + Sleep 10 + Go Into Project project${random_num1}${random_num2} has_image=${false} + Disable Read Only + Close Browser + +Test Case - Push Docker Manifest Index and Display + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + ${image_a}= Set Variable hello-world + ${image_b}= Set Variable busybox + ${image_a_ver}= Set Variable latest + ${image_b_ver}= Set Variable latest + + Sign In Harbor ${HARBOR_URL} user010 Test1@34 + Create An New Project test${d} + + Push image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} test${d} ${image_a}:${image_a_ver} + Go Into Project test${d} + Wait Until Page Contains test${d}/${image_a} + + Push image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} test${d} ${image_b}:${image_b_ver} + Go Into Project test${d} + Wait Until Page Contains test${d}/${image_b} + + Docker Push Index ${ip} user010 Test1@34 ${ip}/test${d}/index${d}:index_tag${d} ${ip}/test${d}/${image_a}:${image_a_ver} ${ip}/test${d}/${image_b}:${image_b_ver} + + Go Into Project test${d} + Wait Until Page Contains test${d}/index${d} + + Go Into Repo test${d}/index${d} + Wait Until Page Contains index_tag${d} + + Go Into Project test${d} + Wait Until Page Contains test${d}/index${d} + Go Into Repo test${d}/index${d} + Go Into Index + Page Should Contain Element ${artifact_rows} limit=2 + +Test Case - Push CNAB Bundle and Display + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s + + Sign In Harbor ${HARBOR_URL} user010 Test1@34 + Create An New Project test${d} + + ${target}= Set Variable ${ip}/test${d}/cnab${d}:cnab_tag${d} + CNAB Push Bundle ${ip} user010 Test1@34 ${target} ./tests/robot-cases/Group0-Util/bundle.json + + Go Into Project test${d} + Wait Until Page Contains test${d}/cnab${d} + + Go Into Repo test${d}/cnab${d} + Wait Until Page Contains cnab_tag${d}