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
cmd/vole/attach_test.go → client/transfer_test.go +6−6
| @@ -1,8 +1,8 @@ | |||
| 1 | package main | ||
| 1 | package client | ||
| 2 | 2 | ||
| 3 | 3 | // The protocol client is tested against the real server handler rather than a | |
| 4 | 4 | // mock: the framing, the status shape and the batch answer all have to agree with | |
| 5 | // internal/lfs, and a mock would agree with whatever this file happened to write. | ||
| 5 | // lfs, and a mock would agree with whatever this file happened to write. | ||
| 6 | 6 | ||
| 7 | 7 | import ( | |
| 8 | 8 | "crypto/sha256" | |
| @@ -13,15 +13,15 @@ import ( | |||
| 13 | 13 | "path/filepath" | |
| 14 | 14 | "testing" | |
| 15 | 15 | ||
| 16 | "github.com/rodent-software/vole/internal/lfs" | ||
| 16 | "github.com/rodent-software/vole/core/lfs" | ||
| 17 | 17 | ) | |
| 18 | 18 | ||
| 19 | 19 | // transferSession starts the server side of an upload session over a pipe and | |
| 20 | 20 | // returns a client holding the other end. | |
| 21 | func transferSession(t *testing.T, store *lfs.Store) (*transfer, func()) { | ||
| 21 | func transferSession(t *testing.T, store *lfs.Store) (*Transfer, func()) { | ||
| 22 | 22 | t.Helper() | |
| 23 | 23 | client, server := net.Pipe() | |
| 24 | tx := &transfer{p: newPktConn(client, client)} | ||
| 24 | tx := &Transfer{p: newPktConn(client, client)} | ||
| 25 | 25 | done := make(chan struct{}) | |
| 26 | 26 | go func() { | |
| 27 | 27 | defer close(done) | |
| @@ -125,7 +125,7 @@ func TestParseSSHRemote(t *testing.T) { | |||
| 125 | 125 | {remote: "https://example.com/demo.git", wantErr: true}, | |
| 126 | 126 | } | |
| 127 | 127 | for _, c := range cases { | |
| 128 | host, port, path, err := parseSSHRemote(c.remote) | ||
| 128 | host, port, path, err := ParseSSHRemote(c.remote) | ||
| 129 | 129 | if c.wantErr { | |
| 130 | 130 | if err == nil { | |
| 131 | 131 | t.Errorf("%q parsed as %s %s %s, want an error", c.remote, host, port, path) | |