Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Replace the runner allowlist with a runner role

648cd81bde97042f682a528ebb9ce6353b95bf3f · Keenan Nemetz · 1d ago · parent ea92d754

server/admin_test.go +3−7

@@ -182,11 +182,10 @@ func TestRemoteAdminManagesAccountsAndRepos(t *testing.T) {
182 182 t.Fatalf("acl set-default-role: %v\nstdout: %s\nstderr: %s", err, out, errOut)
183 183 }
184 184 for _, args := range [][]string{
185 {"acl", "set-role", "remote-demo", "bob", "contribute"},
185 {"acl", "set-role", "remote-demo", "bob", "runner"},
186 186 {"acl", "set-approvals", "remote-demo", "2"},
187 187 {"acl", "checks", "disable", "remote-demo"},
188 188 {"acl", "protect", "add", "remote-demo", "refs/heads/main"},
189 {"acl", "runners", "add", "remote-demo", "bob"},
190 189 } {
191 190 if out, errOut, err = f.adminSSH(f.keyPath, nil, args...); err != nil {
192 191 t.Fatalf("%v: %v\nstdout: %s\nstderr: %s", args, err, out, errOut)
@@ -203,8 +202,8 @@ func TestRemoteAdminManagesAccountsAndRepos(t *testing.T) {
203 202 if a.Default != "read" {
204 203 t.Fatalf("default role = %q, want read", a.Default)
205 204 }
206 if a.Entries["bob"] != "contribute" {
207 t.Fatalf("bob role = %q, want contribute", a.Entries["bob"])
205 if a.Entries["bob"] != "runner" {
206 t.Fatalf("bob role = %q, want runner", a.Entries["bob"])
208 207 }
209 208 if got := a.RequiredApprovals(); got != 2 {
210 209 t.Fatalf("approvals required = %d, want 2", got)
@@ -215,9 +214,6 @@ func TestRemoteAdminManagesAccountsAndRepos(t *testing.T) {
215 214 if got := strings.Join(a.Protected, ","); got != "refs/heads/main" {
216 215 t.Fatalf("protected = %q", got)
217 216 }
218 if got := strings.Join(a.Runners, ","); got != "bob" {
219 t.Fatalf("runners = %q", got)
220 }
221 217
222 218 // The remote surface applies the same rule as the local one: a pattern the
223 219 // hook can never match is refused and nothing is stored.