Sign in

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

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/hook/lfs_test.go → server/hook/lfs_test.go +7−11

@@ -8,10 +8,9 @@ import (
8 8 "strings"
9 9 "testing"
10 10
11 "github.com/rodent-software/vole/internal/acl"
12 "github.com/rodent-software/vole/internal/gitx"
13 "github.com/rodent-software/vole/internal/lfs"
14 "github.com/rodent-software/vole/internal/repo"
11 "github.com/rodent-software/vole/core/git"
12 "github.com/rodent-software/vole/core/lfs"
13 "github.com/rodent-software/vole/forge/repo"
15 14 )
16 15
17 16 // filesFixture builds a repository whose first commit contains every file, which
@@ -36,7 +35,7 @@ func filesFixture(t *testing.T, files map[string][]byte) *fixture {
36 35 }
37 36
38 37 g := m.Git()
39 tree, err := gitx.WriteFlatTree(g, files)
38 tree, err := git.WriteFlatTree(g, files)
40 39 if err != nil {
41 40 t.Fatal(err)
42 41 }
@@ -170,7 +169,7 @@ func TestDeletedPointerDoesNotBlockItsOwnRemoval(t *testing.T) {
170 169 if err != nil {
171 170 t.Fatal(err)
172 171 }
173 clutter, err := g.MkTree([]gitx.Entry{
172 clutter, err := g.MkTree([]git.Entry{
174 173 {Mode: "100644", Type: "blob", SHA: badBlob, Name: "artifact.bin"},
175 174 {Mode: "100644", Type: "blob", SHA: goodBlob, Name: "README.md"},
176 175 })
@@ -181,7 +180,7 @@ func TestDeletedPointerDoesNotBlockItsOwnRemoval(t *testing.T) {
181 180 if err != nil {
182 181 t.Fatal(err)
183 182 }
184 clean, err := g.MkTree([]gitx.Entry{
183 clean, err := g.MkTree([]git.Entry{
185 184 {Mode: "100644", Type: "blob", SHA: goodBlob, Name: "README.md"},
186 185 })
187 186 if err != nil {
@@ -200,13 +199,10 @@ func TestDeletedPointerDoesNotBlockItsOwnRemoval(t *testing.T) {
200 199 // The rules live in the instance database, so the gate needs it even when a
201 200 // test is only about pointers.
202 201 UsersDB: testUsersDB(root),
203 In: strings.NewReader(gitx.ZeroSHA + " " + c2 + " refs/heads/main\n"),
202 In: strings.NewReader(git.ZeroSHA + " " + c2 + " refs/heads/main\n"),
204 203 Out: &out,
205 204 })
206 205 if code != 0 {
207 206 t.Fatalf("removing a broken pointer was rejected:\n%s", out.String())
208 207 }
209 208 }
210
211 // The ACL helper is used above only through repo.Meta; keep the import honest.
212 var _ = acl.Write