mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-20 23:57:42 +01:00
c4fbcb481e
Signed-off-by: danfengliu <danfengl@vmware.com>
91 lines
3.2 KiB
Plaintext
91 lines
3.2 KiB
Plaintext
// 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 Harbor BATs
|
|
Library ../../apitests/python/library/Harbor.py ${SERVER_CONFIG}
|
|
Resource ../../resources/Util.robot
|
|
Default Tags Replication
|
|
|
|
*** Variables ***
|
|
${HARBOR_URL} https://${ip}
|
|
${SSH_USER} root
|
|
${HARBOR_ADMIN} admin
|
|
${SERVER} ${ip}
|
|
${SERVER_URL} https://${SERVER}
|
|
${SERVER_API_ENDPOINT} ${SERVER_URL}/api
|
|
&{SERVER_CONFIG} endpoint=${SERVER_API_ENDPOINT} verify_ssl=False
|
|
${REMOTE_SERVER} ${ip1}
|
|
${REMOTE_SERVER_URL} https://${REMOTE_SERVER}
|
|
${REMOTE_SERVER_API_ENDPOINT} ${REMOTE_SERVER_URL}/api
|
|
|
|
*** Test Cases ***
|
|
Test Case - Get Harbor Version
|
|
#Just get harbor version and log it
|
|
Get Harbor Version
|
|
|
|
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 - Harbor 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 harbor edp1${d} https://${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} N
|
|
Endpoint Is Pingable
|
|
Enable Certificate Verification
|
|
Endpoint Is Unpingable
|
|
Close Browser
|
|
|
|
Test Case - DockerHub Endpoint Add
|
|
#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 dockerHub edp1${d} https://hub.docker.com/ danfengliu Aa123456 Y
|
|
Close Browser
|
|
|
|
Test Case - Harbor Endpoint Add
|
|
#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 harbor testabc https://${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} Y
|
|
Close Browser
|
|
|
|
Test Case - Harbor 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
|
|
Retry Wait Until Page Contains deletea
|
|
Close Browser
|
|
|
|
Test Case - Harbor Endpoint Delete
|
|
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
|
|
Delete Success deletea
|
|
Close Browser |