mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-30 06:03:45 +01:00
75e6b5d91c
Fix up keyword: push image with tag Fix up case: Project Admin Add Labels To Repo Fix up case: Proj Replication Jobs Log View
153 lines
5.6 KiB
Plaintext
153 lines
5.6 KiB
Plaintext
// 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
|
|
Suite Setup Nightly Test Setup ${ip} ${SSH_PWD} ${HARBOR_PASSWORD} ${ip1}
|
|
Suite Teardown Collect Nightly Logs ${ip} ${SSH_PWD} ${ip1}
|
|
Default Tags Replication
|
|
|
|
*** Variables ***
|
|
${HARBOR_URL} https://${ip}
|
|
${SSH_USER} root
|
|
${HARBOR_ADMIN} admin
|
|
*** Test Cases ***
|
|
|
|
Test Case - Pro Replication Rules Add
|
|
Init Chrome Driver
|
|
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
|
Switch To Replication Manage
|
|
Check New Rule UI Without Endpoint
|
|
Close Browser
|
|
|
|
Test Case - Endpoint Verification
|
|
#This case need vailid info and selfsign cert
|
|
Init Chrome Driver
|
|
${d}= Get Current Date result_format=%m%s
|
|
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
|
Switch To Registries
|
|
Create A New Endpoint edp1${d} https://${ip1} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} N
|
|
Endpoint Is Pingable
|
|
Enable Certificate Verification
|
|
Endpoint Is Unpingable
|
|
Close Browser
|
|
|
|
Test Case - Endpoint Add
|
|
Init Chrome Driver
|
|
${d}= Get Current Date result_format=%m%s
|
|
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
|
Switch To Registries
|
|
Create A New Endpoint testabc https://${d} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
|
Wait Until Page Contains testabc
|
|
Close Browser
|
|
|
|
Test Case - Endpoint Edit
|
|
Init Chrome Driver
|
|
${d}= Get Current Date result_format=%m%s
|
|
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
|
Switch To Registries
|
|
Rename Endpoint testabc deletea
|
|
Wait Until Page Contains deletea
|
|
Close Browser
|
|
|
|
#Test Case - Endpoint Delete #Temp disable for ui is unstable
|
|
# Init Chrome Driver
|
|
# ${d}= Get Current Date result_format=%m%s
|
|
# Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
|
# Switch To Registries
|
|
# Delete Endpoint deletea
|
|
# Wait Until Page Does Not Contain deletea
|
|
# Close Browser
|
|
|
|
Test Case - Rule Edit
|
|
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}
|
|
Switch To Registries
|
|
Create A New Endpoint e${d} https://ip ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
|
Switch To Replication Manage
|
|
Create A Rule With Existing Endpoint rule${d} project${d} e${d} Immediate
|
|
Rename Rule rule${d} newname
|
|
Wait Until Page Contains newname
|
|
Close Browser
|
|
|
|
Test Case - Rule Delete
|
|
Init Chrome Driver
|
|
${d}= Get Current Date result_format=%m%s
|
|
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
|
Switch To Replication Manage
|
|
Delete Rule newname
|
|
Wait Until Page Does Not Contain newname
|
|
Close Browser
|
|
|
|
|
|
Test Case - Trigger Immediate
|
|
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}
|
|
Switch To Registries
|
|
Create A New Endpoint edp${d} https://${ip1} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
|
Switch To Replication Manage
|
|
Create A Rule With Existing Endpoint rule${d} project${d} edp${d} Immediate
|
|
Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} hello-world
|
|
Logout Harbor
|
|
#logout and login target
|
|
Sign In Harbor https://${ip1} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
|
Go Into Project project${d}
|
|
Page Should Contain hello-world
|
|
Go Into Repo hello-world
|
|
Page Should Contain latest
|
|
Close browser
|
|
|
|
Test Case - Trigger Manual
|
|
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}
|
|
#using existing endpoint added before for only one replication endpoint
|
|
Switch To Replication Manage
|
|
Create A Rule With Existing Endpoint rule${d} project${d} edp Manual
|
|
Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} hello-world
|
|
Trigger Replication Manual rule${d}
|
|
Logout Harbor
|
|
#logout and login target
|
|
Sign In Harbor https://${ip1} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
|
Go Into Project project${d}
|
|
Page Should Contain hello-world
|
|
Go Into Repo hello-world
|
|
Page Should Contain latest
|
|
Close browser
|
|
|
|
|
|
Test Case - Proj Replication Jobs Log View
|
|
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}
|
|
Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} hello-world
|
|
Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} busybox
|
|
Switch To Registries
|
|
Create A New Endpoint edp${d} aaa ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
|
Switch To Replication Manage
|
|
Create A Rule With Existing Endpoint rule${d} project${d} edp${d} Immediate
|
|
Filter Rule rule${d}
|
|
Select Rule rule${d}
|
|
Wait Until Page Contains transfer
|
|
Wait Until Page Contains error
|
|
View Job Log busybox
|
|
Close Browser
|