Movatterモバイル変換


[0]ホーム

URL:


gittest

package
v1.1.0Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2024 License:Apache-2.0Imports:26Imported by:0

Details

Repository

github.com/coder/envbuilder

Links

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcCreateGitServer

func CreateGitServer(t *testing.T, optsOptions) *httptest.Server

CreateGitServer creates a git repository with an in-memory filesystemand serves it over HTTP using a httptest.Server.

funcNewRepo

func NewRepo(t *testing.T, fs billy.Filesystem, commits ...CommitFunc) *git.Repository

NewRepo returns a new Git repository.

funcNewServer

func NewServer(fs billy.Filesystem)http.Handler

NewServer returns a http.Handler that serves a git repository.It's expected that the repository is already initialized by the caller.

funcNewServerSSH

func NewServerSSH(t *testing.T, fs billy.Filesystem, pubkeys ...gossh.PublicKey) *transport.Endpoint

funcWriteFile

func WriteFile(t *testing.T, fs billy.Filesystem, path, contentstring)

WriteFile writes a file to the filesystem.

Types

typeCommitFunc

type CommitFunc func(billy.Filesystem, *git.Repository)

CommitFunc commits to a repo.

funcCommit

func Commit(t *testing.T, path, content, msgstring)CommitFunc

Commit is a test helper for committing a single file to a repo.

typeOptions

type Options struct {Files    map[string]stringUsernamestringPasswordstringAuthMW   func(http.Handler)http.HandlerTLSbool}

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp