Documentation ¶
Index ¶
- func CreateGitServer(t *testing.T, opts Options) *httptest.Server
- func NewRepo(t *testing.T, fs billy.Filesystem, commits ...CommitFunc) *git.Repository
- func NewServer(fs billy.Filesystem) http.Handler
- func NewServerSSH(t *testing.T, fs billy.Filesystem, pubkeys ...gossh.PublicKey) *transport.Endpoint
- func WriteFile(t *testing.T, fs billy.Filesystem, path, content string)
- type CommitFunc
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateGitServer ¶
CreateGitServer creates a git repository with an in-memory filesystem and serves it over HTTP using a httptest.Server.
func NewRepo ¶
func NewRepo(t *testing.T, fs billy.Filesystem, commits ...CommitFunc) *git.Repository
NewRepo returns a new Git repository.
func NewServer ¶
NewServer returns a http.Handler that serves a git repository. It's expected that the repository is already initialized by the caller.
func NewServerSSH ¶
Types ¶
type CommitFunc ¶
type CommitFunc func(billy.Filesystem, *git.Repository)
CommitFunc commits to a repo.
Click to show internal directories.
Click to hide internal directories.