mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-22 14:52:17 +01:00
Add LDAP case and add delay to project config to avoid case fail (#4486)
* Add LDAP case and add delay to project config to avoid case fail
This commit is contained in:
parent
55035ada2d
commit
9baee6b88c
@ -71,4 +71,61 @@ sn: Mike02
|
||||
uid: mike02
|
||||
uidnumber: 5001
|
||||
userpassword: {MD5}wb68DeX0CyENafzUADNn9A==
|
||||
memberof: cn=harbor_users,ou=groups,dc=example,dc=com
|
||||
memberof: cn=harbor_users,ou=groups,dc=example,dc=com
|
||||
|
||||
dn: cn=mike03,ou=people,dc=example,dc=com
|
||||
cn: mike03
|
||||
gidnumber: 10000
|
||||
givenname: mike03
|
||||
homedirectory: /home/mike03
|
||||
loginshell: /bin/bash
|
||||
mail: mike03@example.com
|
||||
objectclass: top
|
||||
objectclass: posixAccount
|
||||
objectclass: shadowAccount
|
||||
objectclass: inetOrgPerson
|
||||
objectclass: organizationalPerson
|
||||
objectclass: person
|
||||
sn: Mike03
|
||||
uid: mike03
|
||||
uidnumber: 5002
|
||||
userpassword: {MD5}wb68DeX0CyENafzUADNn9A==
|
||||
memberof: cn=harbor_users,ou=groups,dc=example,dc=com
|
||||
|
||||
dn: cn=mike04,ou=people,dc=example,dc=com
|
||||
cn: mike04
|
||||
gidnumber: 10000
|
||||
givenname: mike04
|
||||
homedirectory: /home/mike04
|
||||
loginshell: /bin/bash
|
||||
mail: mike04@example.com
|
||||
objectclass: top
|
||||
objectclass: posixAccount
|
||||
objectclass: shadowAccount
|
||||
objectclass: inetOrgPerson
|
||||
objectclass: organizationalPerson
|
||||
objectclass: person
|
||||
sn: Mike04
|
||||
uid: mike04
|
||||
uidnumber: 5003
|
||||
userpassword: {MD5}wb68DeX0CyENafzUADNn9A==
|
||||
memberof: cn=harbor_users,ou=groups,dc=example,dc=com
|
||||
|
||||
dn: cn=mike05,ou=people,dc=example,dc=com
|
||||
cn: mike05
|
||||
gidnumber: 10000
|
||||
givenname: mike05
|
||||
homedirectory: /home/mike05
|
||||
loginshell: /bin/bash
|
||||
mail: mike05@example.com
|
||||
objectclass: top
|
||||
objectclass: posixAccount
|
||||
objectclass: shadowAccount
|
||||
objectclass: inetOrgPerson
|
||||
objectclass: organizationalPerson
|
||||
objectclass: person
|
||||
sn: Mike05
|
||||
uid: mike05
|
||||
uidnumber: 5004
|
||||
userpassword: {MD5}wb68DeX0CyENafzUADNn9A==
|
||||
memberof: cn=harbor_users,ou=groups,dc=example,dc=com
|
||||
|
@ -42,4 +42,8 @@ User Email Should Exist
|
||||
[Arguments] ${email}
|
||||
Sign In Harbor ${HARBOR_URL} %{HARBOR_ADMIN} %{HARBOR_PASSWORD}
|
||||
Switch to User Tag
|
||||
Page Should Contain Element xpath=//clr-dg-cell[contains(., '${email}')]
|
||||
Page Should Contain Element xpath=//clr-dg-cell[contains(., '${email}')]
|
||||
|
||||
Add User Button Should Be Disabled
|
||||
Sleep 1
|
||||
Page Should Contain Element //button[contains(.,'New') and @disabled='']
|
||||
|
29
tests/resources/Harbor-Pages/LDAP-Mode.robot
Normal file
29
tests/resources/Harbor-Pages/LDAP-Mode.robot
Normal file
@ -0,0 +1,29 @@
|
||||
# Copyright 2016-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 This resource provides any keywords related to the Harbor private registry appliance
|
||||
Resource ../../resources/Util.robot
|
||||
|
||||
*** Variables ***
|
||||
${HARBOR_VERSION} v1.1.1
|
||||
|
||||
*** Keywords ***
|
||||
|
||||
Ldap User Should Not See Change Password
|
||||
Click Element //clr-header//clr-dropdown[2]//button
|
||||
Sleep 1
|
||||
Page Should Not Contain Password
|
||||
|
||||
|
@ -9,6 +9,7 @@ ${HARBOR_VERSION} V1.1.1
|
||||
|
||||
Goto Project Config
|
||||
Click Element //project-detail//ul/li[contains(.,'Configuration')]
|
||||
Sleep 2
|
||||
|
||||
Click Project Public
|
||||
Mouse Down //hbr-project-policy-config//input[@name='public']
|
||||
|
@ -44,6 +44,7 @@ Resource Harbor-Pages/Configuration.robot
|
||||
Resource Harbor-Pages/Configuration_Elements.robot
|
||||
Resource Harbor-Pages/ToolKit.robot
|
||||
Resource Harbor-Pages/Vulnerability.robot
|
||||
Resource Harbor-Pages/LDAP-Mode.robot
|
||||
Resource Docker-Util.robot
|
||||
Resource Admiral-Util.robot
|
||||
Resource OVA-Util.robot
|
||||
|
@ -37,6 +37,56 @@ Test Case - Ldap Sign in and out
|
||||
Sign In Harbor ${HARBOR_URL} mike zhu88jie
|
||||
Close Browser
|
||||
|
||||
Test Case - System Admin On-board New Member
|
||||
Init Chrome Driver
|
||||
${d}= Get Current Date result_format=%m%s
|
||||
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
||||
Switch To User Tag
|
||||
Page Should Not Contain mike02
|
||||
Back To Projects
|
||||
Create An New Project project${d}
|
||||
Go Into Project project${d}
|
||||
Switch To Member
|
||||
Add Guest Member To Project mike02
|
||||
Page Should Contain mike02
|
||||
Close Browser
|
||||
|
||||
Test Case - LDAP User On-borad New Member
|
||||
Init Chrome Driver
|
||||
${d}= Get Current Date result_format=%m%s
|
||||
Sign In Harbor ${HARBOR_URL} mike03 zhu88jie
|
||||
Switch To User Tag
|
||||
Page Should Not Contain mike04
|
||||
Back To Projects
|
||||
Create An New Project project${d}
|
||||
Go Into Project project${d}
|
||||
Switch To Member
|
||||
Add Guest Member To Project mike04
|
||||
Page Should Contain mike04
|
||||
Close Browser
|
||||
|
||||
Test Case - Home Page Differences With DB Mode
|
||||
Init Chrome Driver
|
||||
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
||||
Logout Harbor
|
||||
Sleep 2
|
||||
Page Should Not Contain Sign up
|
||||
Page Should Not Contain Forgot password
|
||||
Close Browser
|
||||
|
||||
Test Case - New User Button Is Unusable
|
||||
Init Chrome Driver
|
||||
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
||||
Switch To User Tag
|
||||
Add User Button Should Be Disabled
|
||||
Close Browser
|
||||
|
||||
Test Case - Change Password Is Invisible
|
||||
Init Chrome Driver
|
||||
Sign In Harbor ${HARBOR_URL} mike05 zhu88jie
|
||||
Ldap User Should Not See Change Password
|
||||
Close Browser
|
||||
|
||||
Test Case - Ldap User Create Project
|
||||
Init Chrome Driver
|
||||
${d}= Get Current Date result_format=%m%s
|
||||
@ -58,4 +108,4 @@ Test Case - Ldap User Push An Image
|
||||
Close Browser
|
||||
|
||||
Test Case - Ldap User Can Not login
|
||||
Docker Login Fail ${ip} test 123456
|
||||
Docker Login Fail ${ip} test 123456
|
||||
|
Loading…
Reference in New Issue
Block a user