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/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

refactor

c5902451905acdaa478f8476844ccd4a510d9ca9 · Keenan Nemetz · 16d ago · parent ec2aba4b

internal/server/integration_test.go → server/integration_test.go +17−21

@@ -26,16 +26,14 @@ import (
26 26
27 27 "golang.org/x/crypto/ssh"
28 28
29 "github.com/rodent-software/vole/internal/acl"
30 "github.com/rodent-software/vole/internal/config"
31 "github.com/rodent-software/vole/internal/frontmatter"
32 "github.com/rodent-software/vole/internal/gitx"
33 "github.com/rodent-software/vole/internal/identity"
34 "github.com/rodent-software/vole/internal/index"
35 "github.com/rodent-software/vole/internal/issues"
36 "github.com/rodent-software/vole/internal/repo"
37 "github.com/rodent-software/vole/internal/runs"
38 "github.com/rodent-software/vole/internal/server"
29 "github.com/rodent-software/vole/ci/runs"
30 "github.com/rodent-software/vole/core/git"
31 "github.com/rodent-software/vole/forge/config"
32 "github.com/rodent-software/vole/forge/identity"
33 "github.com/rodent-software/vole/forge/index"
34 "github.com/rodent-software/vole/forge/repo"
35 "github.com/rodent-software/vole/metadata"
36 "github.com/rodent-software/vole/server"
39 37 )
40 38
41 39 // binPath is the binary under test, built once by TestMain. It is read by every test
@@ -1537,7 +1535,7 @@ func TestIssueAssigneesRenderedFilteredAndValidated(t *testing.T) {
1537 1535
1538 1536 // commentFile renders issues/<id>/comments/<cid>.md for fixtures.
1539 1537 func commentFile(author, created, body string) string {
1540 d := frontmatter.New()
1538 d := metadata.NewDoc()
1541 1539 d.Word("author", author)
1542 1540 d.Word("created", created)
1543 1541 out, err := d.Bytes(body)
@@ -2013,7 +2011,7 @@ const reqID = "01M5JR2JK29KKMAA1T9MDNTR01"
2013 2011 // requestFile renders requests/<id>/request.md. The body is the request's
2014 2012 // description, so a fixture cannot drift from the format the reader expects.
2015 2013 func requestFile(base, head, author, authorID, body string) string {
2016 d := frontmatter.New()
2014 d := metadata.NewDoc()
2017 2015 d.Text("title", "Land the feature")
2018 2016 d.Word("state", "open")
2019 2017 d.Word("author", author)
@@ -2034,7 +2032,7 @@ func requestMeta(base, head, author, authorID string) string {
2034 2032 }
2035 2033
2036 2034 func approvalFile(base, head string) string {
2037 d := frontmatter.New()
2035 d := metadata.NewDoc()
2038 2036 d.Word("base", base)
2039 2037 d.Word("head", head)
2040 2038 d.Word("created", "2026-10-22T22:10:00Z")
@@ -2047,7 +2045,7 @@ func approvalFile(base, head string) string {
2047 2045
2048 2046 // issueFile renders issues/<id>/issue.md for fixtures.
2049 2047 func issueFile(title, author, state, created string, labels []string, body string, assignees ...string) string {
2050 d := frontmatter.New()
2048 d := metadata.NewDoc()
2051 2049 d.Text("title", title)
2052 2050 d.Word("state", state)
2053 2051 d.Word("author", author)
@@ -2716,7 +2714,7 @@ jobs:
2716 2714 if err != nil {
2717 2715 t.Fatal(err)
2718 2716 }
2719 rec, err := runs.ReadRecord(m.Git(), issues.Ref, done.ID)
2717 rec, err := runs.ReadRecord(m.Git(), metadata.Ref, done.ID)
2720 2718 if err != nil || rec == nil {
2721 2719 t.Fatalf("no record on the branch: %v", err)
2722 2720 }
@@ -2791,12 +2789,12 @@ jobs:
2791 2789 if err != nil {
2792 2790 t.Fatal(err)
2793 2791 }
2794 rec, err := runs.ReadRecord(m.Git(), issues.Ref, done.ID)
2792 rec, err := runs.ReadRecord(m.Git(), metadata.Ref, done.ID)
2795 2793 if err != nil {
2796 2794 t.Fatalf("reading the record: %v", err)
2797 2795 }
2798 2796 if rec == nil {
2799 t.Fatal("a finished run left no record on " + issues.Ref)
2797 t.Fatal("a finished run left no record on " + metadata.Ref)
2800 2798 }
2801 2799 att, err := f.srv.Runs.Attestation(done.ID)
2802 2800 if err != nil || att == nil {
@@ -2816,7 +2814,7 @@ jobs:
2816 2814 if _, errs, err := f.git(t.TempDir(), "clone", "--bare", "-q", f.sshURL(f.repo), clone); err != nil {
2817 2815 t.Fatalf("clone: %s", errs)
2818 2816 }
2819 carried, err := runs.ReadRecord(gitx.Open(clone), issues.Ref, done.ID)
2817 carried, err := runs.ReadRecord(git.Open(clone), metadata.Ref, done.ID)
2820 2818 if err != nil {
2821 2819 t.Fatalf("reading the record from a clone: %v", err)
2822 2820 }
@@ -3029,7 +3027,7 @@ jobs:
3029 3027 }
3030 3028 }
3031 3029
3032 // runOnce executes one queued job with a real runner.
3030 // runOnce executes one queued job with a real agent.
3033 3031 func (f *fixture) runOnce(t *testing.T) { f.runOnceAs(t, f.keyPath) }
3034 3032
3035 3033 // runOnceAs runs one CI job as the account the key belongs to, which is how a test
@@ -3384,8 +3382,6 @@ func TestHealthzReportsUsers(t *testing.T) {
3384 3382 }
3385 3383 }
3386 3384
3387 var _ = acl.Read
3388
3389 3385 // A job that names a machine with runs-on is only built by a runner that carries the
3390 3386 // label. The end-to-end shape matters here: the whole point is that nothing runs, which
3391 3387 // has to be distinguishable from "a runner started and failed".