mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 18:55:18 +01:00
commit
c7790ff37e
@ -1,3 +1,4 @@
|
|||||||
|
# User entry doesn't belong to harbor_users, it should fail to login
|
||||||
dn: uid=test,dc=example,dc=com
|
dn: uid=test,dc=example,dc=com
|
||||||
uid: test
|
uid: test
|
||||||
cn: test
|
cn: test
|
||||||
@ -12,3 +13,41 @@ gidNumber: 1001
|
|||||||
userPassword: 123456
|
userPassword: 123456
|
||||||
mail: test@example.com
|
mail: test@example.com
|
||||||
gecos: test
|
gecos: test
|
||||||
|
|
||||||
|
# OU for People
|
||||||
|
dn: ou=people,dc=example,dc=com
|
||||||
|
objectClass: organizationalUnit
|
||||||
|
ou: People
|
||||||
|
|
||||||
|
# OU for Groups
|
||||||
|
dn: ou=groups,dc=example,dc=com
|
||||||
|
objectClass: organizationalUnit
|
||||||
|
ou: Groups
|
||||||
|
|
||||||
|
# Group Entry harbor_users
|
||||||
|
dn: cn=harbor_users,ou=groups,dc=example,dc=com
|
||||||
|
cn: harbor_users
|
||||||
|
description: All users
|
||||||
|
member: cn=mike,ou=people,dc=example,dc=com
|
||||||
|
objectclass: groupOfNames
|
||||||
|
objectclass: top
|
||||||
|
|
||||||
|
# User belongs to harbor_user
|
||||||
|
dn: cn=mike,ou=people,dc=example,dc=com
|
||||||
|
cn: mike
|
||||||
|
gidnumber: 10000
|
||||||
|
givenname: mike
|
||||||
|
homedirectory: /home/mike
|
||||||
|
loginshell: /bin/bash
|
||||||
|
mail: mike@example.com
|
||||||
|
objectclass: top
|
||||||
|
objectclass: posixAccount
|
||||||
|
objectclass: shadowAccount
|
||||||
|
objectclass: inetOrgPerson
|
||||||
|
objectclass: organizationalPerson
|
||||||
|
objectclass: person
|
||||||
|
sn: Joe
|
||||||
|
uid: mike
|
||||||
|
uidnumber: 5000
|
||||||
|
userpassword: {MD5}wb68DeX0CyENafzUADNn9A==
|
||||||
|
memberof: cn=harbor_users,ou=groups,dc=example,dc=com
|
@ -132,3 +132,9 @@ Kill Local Docker Daemon
|
|||||||
Process Should Be Stopped ${handle}
|
Process Should Be Stopped ${handle}
|
||||||
${rc}= Run And Return Rc kill -9 ${dockerd-pid}
|
${rc}= Run And Return Rc kill -9 ${dockerd-pid}
|
||||||
Should Be Equal As Integers ${rc} 0
|
Should Be Equal As Integers ${rc} 0
|
||||||
|
|
||||||
|
Docker Login Fail
|
||||||
|
[Arguments] ${ip} ${user} ${pwd}
|
||||||
|
Log To Console \nRunning docker login ${ip} ...
|
||||||
|
${rc} ${output}= Run And Return Rc And Output docker login -u ${user} -p ${pwd} ${ip}
|
||||||
|
Should Not Be Equal As Integers ${rc} 0
|
||||||
|
@ -32,6 +32,8 @@ Init LDAP
|
|||||||
Sleep 1
|
Sleep 1
|
||||||
Input Text xpath=//*[@id="ldapBaseDN"] dc=example,dc=com
|
Input Text xpath=//*[@id="ldapBaseDN"] dc=example,dc=com
|
||||||
Sleep 1
|
Sleep 1
|
||||||
|
Input Text xpath=//*[@id="ldapFilter"] (&(objectclass=inetorgperson)(memberof=cn=harbor_users,ou=groups,dc=example,dc=com))
|
||||||
|
Sleep 1
|
||||||
Input Text xpath=//*[@id="ldapUid"] cn
|
Input Text xpath=//*[@id="ldapUid"] cn
|
||||||
Sleep 1
|
Sleep 1
|
||||||
Capture Page Screenshot
|
Capture Page Screenshot
|
||||||
|
@ -343,26 +343,31 @@ Test Case - Ldap Sign in and out
|
|||||||
Switch To Configure
|
Switch To Configure
|
||||||
Init LDAP
|
Init LDAP
|
||||||
Logout Harbor
|
Logout Harbor
|
||||||
Sign In Harbor ${HARBOR_URL} test 123456
|
Sign In Harbor ${HARBOR_URL} mike zhu88jie
|
||||||
Close Browser
|
Close Browser
|
||||||
|
|
||||||
Test Case - Ldap User Create Project
|
Test Case - Ldap User Create Project
|
||||||
Init Chrome Driver
|
Init Chrome Driver
|
||||||
${d}= Get Current Date result_format=%m%s
|
${d}= Get Current Date result_format=%m%s
|
||||||
Sign In Harbor ${HARBOR_URL} test 123456
|
Sign In Harbor ${HARBOR_URL} mike zhu88jie
|
||||||
Create An New Project project${d}
|
Create An New Project project${d}
|
||||||
Close Browser
|
Close Browser
|
||||||
|
|
||||||
Test Case - Ldap User Push An Image
|
Test Case - Ldap User Push An Image
|
||||||
Init Chrome Driver
|
Init Chrome Driver
|
||||||
${d}= Get Current Date result_format=%m%s
|
${d}= Get Current Date result_format=%m%s
|
||||||
Sign In Harbor ${HARBOR_URL} test 123456
|
Sign In Harbor ${HARBOR_URL} mike zhu88jie
|
||||||
Create An New Project project${d}
|
Create An New Project project${d}
|
||||||
|
|
||||||
Push Image ${ip} test 123456 project${d} hello-world:latest
|
Push Image ${ip} mike zhu88jie project${d} hello-world:latest
|
||||||
Go Into Project project${d}
|
Go Into Project project${d}
|
||||||
Wait Until Page Contains project${d}/hello-world
|
Wait Until Page Contains project${d}/hello-world
|
||||||
Close Browser
|
Close Browser
|
||||||
|
|
||||||
|
Test Case - Ldap User Can Not login
|
||||||
|
Docker Login Fail ${ip} test 123456
|
||||||
|
|
||||||
Test Case - Clean Harbor Images
|
Test Case - Clean Harbor Images
|
||||||
Down Harbor
|
Down Harbor
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user