vole
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software:2222/vole.git
A free and open-source forge that lives in your Git repo.
refactor
c5902451905acdaa478f8476844ccd4a510d9ca9 · Keenan Nemetz · 17d ago · parent ec2aba4b
internal/acl/acl_test.go → forge/access/acl_test.go +1−6
| @@ -1,4 +1,4 @@ | |||
| 1 | package acl | ||
| 1 | package access | ||
| 2 | 2 | ||
| 3 | 3 | import "testing" | |
| 4 | 4 | ||
| @@ -30,7 +30,6 @@ func TestRoleOrdering(t *testing.T) { | |||
| 30 | 30 | } | |
| 31 | 31 | } | |
| 32 | 32 | } | |
| 33 | |||
| 34 | 33 | func TestRoleFor(t *testing.T) { | |
| 35 | 34 | t.Parallel() | |
| 36 | 35 | a := &ACL{Default: "none", Entries: map[string]string{ | |
| @@ -49,7 +48,6 @@ func TestRoleFor(t *testing.T) { | |||
| 49 | 48 | } | |
| 50 | 49 | } | |
| 51 | 50 | } | |
| 52 | |||
| 53 | 51 | func TestDefaultAppliesToUnknownUsers(t *testing.T) { | |
| 54 | 52 | t.Parallel() | |
| 55 | 53 | a := &ACL{Default: "read", Entries: map[string]string{"owner": "admin"}} | |
| @@ -63,7 +61,6 @@ func TestDefaultAppliesToUnknownUsers(t *testing.T) { | |||
| 63 | 61 | t.Fatal("explicit entry should win") | |
| 64 | 62 | } | |
| 65 | 63 | } | |
| 66 | |||
| 67 | 64 | func TestIsProtected(t *testing.T) { | |
| 68 | 65 | t.Parallel() | |
| 69 | 66 | a := &ACL{Protected: []string{"refs/heads/main", "refs/heads/release/*"}} | |
| @@ -79,7 +76,6 @@ func TestIsProtected(t *testing.T) { | |||
| 79 | 76 | } | |
| 80 | 77 | } | |
| 81 | 78 | } | |
| 82 | |||
| 83 | 79 | func TestJSONRoundTrip(t *testing.T) { | |
| 84 | 80 | t.Parallel() | |
| 85 | 81 | a := Empty("keenan") | |
| @@ -99,7 +95,6 @@ func TestJSONRoundTrip(t *testing.T) { | |||
| 99 | 95 | t.Fatal("protection lost") | |
| 100 | 96 | } | |
| 101 | 97 | } | |
| 102 | |||
| 103 | 98 | func TestParseRejectsBadRoles(t *testing.T) { | |
| 104 | 99 | t.Parallel() | |
| 105 | 100 | if _, err := Parse([]byte(`{"version":1,"default":"root"}`)); err == nil { | |