harbor/tests/robot-cases/Group3-RBAC/3-02-DB-user-manage-project-publicity.robot

60 lines
2.3 KiB
Plaintext
Raw Normal View History

// 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 Manage project publicity
Resource ../../resources/Util.robot
Default Tags regression
Test Case - Manage project publicity
#Start Docker Daemon Locally
Init Chrome Driver
${d}= Get Current Date result_format=%m%s
${rc} ${ip}= run and return rc and output ip a s eth0|grep "inet "|awk '{print $2}'|awk -F "/" '{print $1}'
Log to console ${ip}
Create An New User url=${HARBOR_URL} username=usera${d} email=usera${d}@vmware.com realname=usera${d} newPassword=Test1@34 comment=harbor
Logout Harbor
Create An New User url=${HARBOR_URL} username=userb${d} email=userb${d}@vmware.com realname=userb${d} newPassword=Test1@34 comment=harbor
Logout Harbor
Sign In Harbor ${HARBOR_URL} usera${d} Test1@34
Create An New Public Project project${d}
Push image ${ip} usera${d} Test1@34 project${d} hello-world:latest
Pull image ${ip} userb${d} Test1@34 project${d} hello-world:latest
Logout Harbor
Sign In Harbor ${HARBOR_URL} userb${d} Test1@34
Project Should Display project${d}
Search Private Projects
Project Should Not Display project${d}
Logout Harbor
Sign In Harbor ${HARBOR_URL} usera${d} Test1@34
Make Project Private project${d}
Logout Harbor
Sign In Harbor ${HARBOR_URL} userb${d} Test1@34
Project Should Not Display project${d}
Cannot Pull image ${ip} usera${d} Test1@34 project${d} hello-world:latest
Logout Harbor
Sign In Harbor ${HARBOR_URL} usera${d} Test1@34
Make Project Public project${d}
Logout Harbor
Sign In Harbor ${HARBOR_URL} userb${d} Test1@34
Project Should Display project${d}