mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-14 08:48:02 +02:00
update test
This commit is contained in:
parent
068ef6d6d5
commit
9352cc2ded
@ -280,8 +280,9 @@ func TestActionsTokenPermissionsClamping(t *testing.T) {
|
|||||||
|
|
||||||
// Set Clamping Config: Custom Mode (Default=Max), Max Code = Read
|
// Set Clamping Config: Custom Mode (Default=Max), Max Code = Read
|
||||||
req := NewRequestWithValues(t, "POST", fmt.Sprintf("/%s/%s/settings/actions/general/token_permissions", repo.OwnerName, repo.Name), map[string]string{
|
req := NewRequestWithValues(t, "POST", fmt.Sprintf("/%s/%s/settings/actions/general/token_permissions", repo.OwnerName, repo.Name), map[string]string{
|
||||||
"token_permission_mode": "custom",
|
"token_permission_mode": "custom",
|
||||||
"max_code": "read",
|
"enable_max_permissions": "true",
|
||||||
|
"max_code": "read",
|
||||||
})
|
})
|
||||||
session.MakeRequest(t, req, http.StatusSeeOther)
|
session.MakeRequest(t, req, http.StatusSeeOther)
|
||||||
|
|
||||||
@ -345,9 +346,10 @@ func TestActionsTokenPackagePermission(t *testing.T) {
|
|||||||
|
|
||||||
// Set Config: Custom Mode, Max Packages = Write, Max Code = Read
|
// Set Config: Custom Mode, Max Packages = Write, Max Code = Read
|
||||||
req := NewRequestWithValues(t, "POST", fmt.Sprintf("/%s/%s/settings/actions/general/token_permissions", repo.OwnerName, repo.Name), map[string]string{
|
req := NewRequestWithValues(t, "POST", fmt.Sprintf("/%s/%s/settings/actions/general/token_permissions", repo.OwnerName, repo.Name), map[string]string{
|
||||||
"token_permission_mode": "custom",
|
"token_permission_mode": "custom",
|
||||||
"max_packages": "write",
|
"enable_max_permissions": "true",
|
||||||
"max_code": "read", // Ensure repo read access if needed
|
"max_packages": "write",
|
||||||
|
"max_code": "read", // Ensure repo read access if needed
|
||||||
})
|
})
|
||||||
session.MakeRequest(t, req, http.StatusSeeOther)
|
session.MakeRequest(t, req, http.StatusSeeOther)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user