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

@@ -9,10 +9,9 @@ import (
9 9 "testing"
10 10 "time"
11 11
12 "github.com/rodent-software/vole/internal/access"
13 "github.com/rodent-software/vole/internal/acl"
14 "github.com/rodent-software/vole/internal/gitx"
15 "github.com/rodent-software/vole/internal/repo"
12 "github.com/rodent-software/vole/core/git"
13 "github.com/rodent-software/vole/forge/access"
14 "github.com/rodent-software/vole/forge/repo"
16 15 )
17 16
18 17 const domain = "pages.test"
@@ -64,8 +63,8 @@ func (f *fixture) publish(files map[string][]byte) string {
64 63 if err != nil {
65 64 f.t.Fatal(err)
66 65 }
67 g := gitx.Open(m.Dir)
68 tree, err := gitx.WriteFlatTree(g, files)
66 g := git.Open(m.Dir)
67 tree, err := git.WriteFlatTree(g, files)
69 68 if err != nil {
70 69 f.t.Fatal(err)
71 70 }
@@ -136,7 +135,7 @@ func TestServesTheBranchAsASite(t *testing.T) {
136 135 t.Fatalf("index Content-Type = %q", ct)
137 136 }
138 137 // The ETag is the blob sha, which is what makes invalidation exact.
139 g := gitx.Open(mustDir(t, f))
138 g := git.Open(mustDir(t, f))
140 139 entries, err := g.LsTreeR(commit)
141 140 if err != nil {
142 141 t.Fatal(err)
@@ -358,13 +357,10 @@ func TestCacheEvictsAndDropsCommits(t *testing.T) {
358 357 }
359 358 }
360 359
361 // The ACL type is used by the fixture through repo.Meta; keep the import honest.
362 var _ = acl.Read
363
364 360 // Benchmarks for the read path. They are not part of the gate; run them when
365 361 // changing the cache or the pool:
366 362 //
367 // go test ./internal/pages/ -bench . -benchtime=1s -run XXX
363 // go test ./pages/ -bench . -benchtime=1s -run XXX
368 364 func benchFixture(b *testing.B) *fixture {
369 365 b.Helper()
370 366 f := newFixture(b)