mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-03 14:37:44 +01:00
Fix bug for manage-project-member, due to keywords changed for oidc-auth-mode, test case manage-project-member should be debug at the same time. (#7888)
Signed-off-by: danfengliu <danfengl@vmware.com>
This commit is contained in:
parent
673b84bd0a
commit
a2b651969c
@ -120,11 +120,12 @@ User Should Not Be A Member Of Project
|
||||
[Arguments] ${user} ${pwd} ${project} ${is_oidc_mode}=${false}
|
||||
Run Keyword If ${is_oidc_mode} == ${false} Sign In Harbor ${HARBOR_URL} ${user} ${pwd}
|
||||
... ELSE Sign In Harbor With OIDC User ${HARBOR_URL} username=${user}
|
||||
${pwd}= Run Keyword And Return If ${is_oidc_mode} == ${true} Get Secrete By API ${HARBOR_URL}
|
||||
${pwd_oidc}= Run Keyword And Return If ${is_oidc_mode} == ${true} Get Secrete By API ${HARBOR_URL}
|
||||
${password}= Set Variable If ${is_oidc_mode} == ${true} ${pwd_oidc} ${pwd}
|
||||
Project Should Not Display ${project}
|
||||
Logout Harbor
|
||||
Cannot Pull image ${ip} ${user} ${pwd} ${project} ${ip}/${project}/hello-world
|
||||
Cannot Push image ${ip} ${user} ${pwd} ${project} hello-world
|
||||
Cannot Pull image ${ip} ${user} ${password} ${project} ${ip}/${project}/hello-world
|
||||
Cannot Push image ${ip} ${user} ${password} ${project} hello-world
|
||||
|
||||
Manage Project Member
|
||||
[Arguments] ${admin} ${pwd} ${project} ${user} ${op} ${has_image}=${true} ${is_oidc_mode}=${false}
|
||||
@ -149,34 +150,37 @@ User Should Be Guest
|
||||
[Arguments] ${user} ${pwd} ${project} ${is_oidc_mode}=${false}
|
||||
Run Keyword If ${is_oidc_mode} == ${false} Sign In Harbor ${HARBOR_URL} ${user} ${pwd}
|
||||
... ELSE Sign In Harbor With OIDC User ${HARBOR_URL} username=${user}
|
||||
${pwd}= Run Keyword And Return If ${is_oidc_mode} == ${true} Get Secrete By API ${HARBOR_URL}
|
||||
${pwd_oidc}= Run Keyword And Return If ${is_oidc_mode} == ${true} Get Secrete By API ${HARBOR_URL}
|
||||
${password}= Set Variable If ${is_oidc_mode} == ${true} ${pwd_oidc} ${pwd}
|
||||
Project Should Display ${project}
|
||||
Go Into Project ${project}
|
||||
Switch To Member
|
||||
User Can Not Add Member
|
||||
Page Should Contain Element xpath=//clr-dg-row[contains(.,'${user}')]//clr-dg-cell[contains(.,'Guest')]
|
||||
Logout Harbor
|
||||
Pull image ${ip} ${user} ${pwd} ${project} hello-world
|
||||
Cannot Push image ${ip} ${user} ${pwd} ${project} hello-world
|
||||
Pull image ${ip} ${user} ${password} ${project} hello-world
|
||||
Cannot Push image ${ip} ${user} ${password} ${project} hello-world
|
||||
|
||||
User Should Be Developer
|
||||
[Arguments] ${user} ${pwd} ${project} ${is_oidc_mode}=${false}
|
||||
Run Keyword If ${is_oidc_mode} == ${false} Sign In Harbor ${HARBOR_URL} ${user} ${pwd}
|
||||
... ELSE Sign In Harbor With OIDC User ${HARBOR_URL} username=${user}
|
||||
${pwd}= Run Keyword And Return If ${is_oidc_mode} == ${true} Get Secrete By API ${HARBOR_URL}
|
||||
${pwd_oidc}= Run Keyword And Return If ${is_oidc_mode} == ${true} Get Secrete By API ${HARBOR_URL}
|
||||
${password}= Set Variable If ${is_oidc_mode} == ${true} ${pwd_oidc} ${pwd}
|
||||
Project Should Display ${project}
|
||||
Go Into Project ${project}
|
||||
Switch To Member
|
||||
User Can Not Add Member
|
||||
Page Should Contain Element xpath=//clr-dg-row[contains(.,'${user}')]//clr-dg-cell[contains(.,'Developer')]
|
||||
Logout Harbor
|
||||
Push Image With Tag ${ip} ${user} ${pwd} ${project} hello-world v1
|
||||
Push Image With Tag ${ip} ${user} ${password} ${project} hello-world v1
|
||||
|
||||
User Should Be Admin
|
||||
[Arguments] ${user} ${pwd} ${project} ${guest} ${is_oidc_mode}=${false}
|
||||
Run Keyword If ${is_oidc_mode} == ${false} Sign In Harbor ${HARBOR_URL} ${user} ${pwd}
|
||||
... ELSE Sign In Harbor With OIDC User ${HARBOR_URL} username=${user}
|
||||
${pwd}= Run Keyword And Return If ${is_oidc_mode} == ${true} Get Secrete By API ${HARBOR_URL}
|
||||
${pwd_oidc}= Run Keyword And Return If ${is_oidc_mode} == ${true} Get Secrete By API ${HARBOR_URL}
|
||||
${password}= Set Variable If ${is_oidc_mode} == ${true} ${pwd_oidc} ${pwd}
|
||||
Project Should Display ${project}
|
||||
Go Into Project ${project}
|
||||
Switch To Member
|
||||
@ -184,20 +188,21 @@ User Should Be Admin
|
||||
User Can Change Role ${guest}
|
||||
Page Should Contain Element xpath=//clr-dg-row[contains(.,'${user}')]//clr-dg-cell[contains(.,'Admin')]
|
||||
Logout Harbor
|
||||
Push Image With Tag ${ip} ${user} ${pwd} ${project} hello-world v2
|
||||
Push Image With Tag ${ip} ${user} ${password} ${project} hello-world v2
|
||||
|
||||
User Should Be Master
|
||||
[Arguments] ${user} ${pwd} ${project} ${is_oidc_mode}=${false}
|
||||
Run Keyword If ${is_oidc_mode} == ${false} Sign In Harbor ${HARBOR_URL} ${user} ${pwd}
|
||||
... ELSE Sign In Harbor With OIDC User ${HARBOR_URL} username=${user}
|
||||
${pwd}= Run Keyword And Return If ${is_oidc_mode} == ${true} Get Secrete By API ${HARBOR_URL}
|
||||
${pwd_oidc}= Run Keyword And Return If ${is_oidc_mode} == ${true} Get Secrete By API ${HARBOR_URL}
|
||||
${password}= Set Variable If ${is_oidc_mode} == ${true} ${pwd_oidc} ${pwd}
|
||||
Project Should Display ${project}
|
||||
Go Into Project ${project}
|
||||
Delete Repo ${project}
|
||||
Switch To Member
|
||||
Page Should Contain Element xpath=//clr-dg-row[contains(.,'${user}')]//clr-dg-cell[contains(.,'Master')]
|
||||
Logout Harbor
|
||||
Push Image With Tag ${ip} ${user} ${pwd} ${project} hello-world v3
|
||||
Push Image With Tag ${ip} ${user} ${password} ${project} hello-world v3
|
||||
|
||||
Project Should Have Member
|
||||
[Arguments] ${project} ${user}
|
||||
|
@ -123,7 +123,7 @@ Delete A Project Without Sign In Harbor
|
||||
Project Should Be Deleted project${d}
|
||||
|
||||
Manage Project Member Without Sign In Harbor
|
||||
[Arguments] ${sign_in_user}=user004 ${sign_in_pwd}=Test1@34 ${test_user1}=user005 ${test_user2}=user006 ${is_oidc_mode}=${false}
|
||||
[Arguments] ${sign_in_user} ${sign_in_pwd} ${test_user1}=user005 ${test_user2}=user006 ${is_oidc_mode}=${false}
|
||||
${d}= Get current Date result_format=%m%s
|
||||
Create An New Project project${d}
|
||||
Push image ip=${ip} user=${sign_in_user} pwd=${sign_in_pwd} project=project${d} image=hello-world
|
||||
|
@ -300,11 +300,12 @@ Test Case - User View Logs
|
||||
Do Log Advanced Search
|
||||
Close Browser
|
||||
|
||||
|
||||
Test Case - Manage Project Member
|
||||
Init Chrome Driver
|
||||
Sign In Harbor ${HARBOR_URL} user004 Test1@34
|
||||
Manage Project Member Without Sign In Harbor
|
||||
${user}= Set Variable user004
|
||||
${pwd}= Set Variable Test1@34
|
||||
Sign In Harbor ${HARBOR_URL} ${user} ${pwd}
|
||||
Manage Project Member Without Sign In Harbor ${user} ${pwd}
|
||||
Close Browser
|
||||
|
||||
Test Case - Manage project publicity
|
||||
|
Loading…
Reference in New Issue
Block a user