mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-28 03:27:41 +01:00
ddf9d74135
1. Add retry for Get Statics Text keywords make this operation robust; 2. Replace image to one with slash in name for CNAB test, to cover more condition; 3. Add replication rule deletion verfication in upgrade test; 4. Add non-admin user in pull operation for proxy cache test; 5. Add verification for quota display for upgrade test; 6. Add test for large size of image replication; 7. Add test checkpoint for system robot account py-test script; Signed-off-by: Danfeng Liu (c) <danfengl@vmware.com>
67 lines
2.6 KiB
Plaintext
67 lines
2.6 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
|
|
Resource ../../resources/Util.robot
|
|
Suite Setup Install Harbor to Test Server
|
|
Suite Teardown Down Harbor
|
|
Default Tags BAT
|
|
|
|
*** Variables ***
|
|
${HARBOR_URL} https://${ip}
|
|
|
|
*** Test Cases ***
|
|
Test Case - Registry Basic Verfication
|
|
Init Chrome Driver
|
|
${d}= Get Current Date result_format=%m%s
|
|
|
|
Create An New Project With New User url=${HARBOR_URL} username=tester${d} email=tester${d}@vmware.com realname=tester${d} newPassword=Test1@34 comment=harbor projectname=project${d} public=true
|
|
Push image ${ip} tester${d} Test1@34 project${d} busybox:latest
|
|
Pull image ${ip} tester${d} Test1@34 project${d} busybox:latest
|
|
Go Into Project project${d}
|
|
Delete Repo project${d} busybox
|
|
|
|
Close Browser
|
|
|
|
Test Case - Notary Basic Verfication
|
|
Enable Notary Client
|
|
|
|
${rc} ${output}= Run And Return Rc And Output docker pull hello-world:latest
|
|
Log ${output}
|
|
|
|
Push image ${ip} %{HARBOR_ADMIN} %{HARBOR_PASSWORD} library hello-world:latest
|
|
${rc} ${output}= Run And Return Rc And Output ./tests/robot-cases/Group0-Util/notary-push-image.sh ${ip} ${notaryServerEndpoint}
|
|
Log ${output}
|
|
Should Be Equal As Integers ${rc} 0
|
|
|
|
${rc} ${output}= Run And Return Rc And Output curl -u admin:Harbor12345 -s --insecure -H "Content-Type: application/json" -X GET "https://${ip}/api/repositories/library/tomcat/signatures"
|
|
Log To Console ${output}
|
|
Should Be Equal As Integers ${rc} 0
|
|
#Should Contain ${output} sha256
|
|
|
|
Test Case - Ldap Basic Verfication
|
|
Switch To LDAP
|
|
Init Chrome Driver
|
|
Sign In Harbor ${HARBOR_URL} %{HARBOR_ADMIN} %{HARBOR_PASSWORD}
|
|
Switch To Configure
|
|
Init LDAP
|
|
Logout Harbor
|
|
Sign In Harbor ${HARBOR_URL} mike zhu88jie
|
|
Close Browser
|
|
|
|
Test Case - Run LDAP Group Related API Test
|
|
Harbor API Test ./tests/apitests/python/test_ldap_admin_role.py
|
|
Harbor API Test ./tests/apitests/python/test_user_group.py
|
|
Harbor API Test ./tests/apitests/python/test_assign_role_to_ldap_group.py |