testhelper

package
v4.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2018 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GitalyInfoRefsResponseMock   = strings.Repeat("Mock Gitaly InfoRefsResponse data", 100000)
	GitalyGetBlobResponseMock    = strings.Repeat("Mock Gitaly GetBlobResponse data", 100000)
	GitalyGetArchiveResponseMock = strings.Repeat("Mock Gitaly GetArchiveResponse data", 100000)
	GitalyGetDiffResponseMock    = strings.Repeat("Mock Gitaly GetDiffResponse data", 100000)
	GitalyGetPatchResponseMock   = strings.Repeat("Mock Gitaly GetPatchResponse data", 100000)

	GitalyGetSnapshotResponseMock = strings.Repeat("Mock Gitaly GetSnapshotResponse data", 100000)

	GitalyReceivePackResponseMock []byte
	GitalyUploadPackResponseMock  []byte
)

Functions

func AssertPatchSeries added in v0.8.5

func AssertPatchSeries(t *testing.T, blob []byte, expected ...string)

AssertPatchSeries takes a `git format-patch` blob, extracts the From xxxxx lines and compares the SHAs to expected list.

func AssertResponseBody

func AssertResponseBody(t *testing.T, response *httptest.ResponseRecorder, expectedBody string)

func AssertResponseBodyRegexp added in v1.4.0

func AssertResponseBodyRegexp(t *testing.T, response *httptest.ResponseRecorder, expectedBody *regexp.Regexp)

func AssertResponseCode

func AssertResponseCode(t *testing.T, response *httptest.ResponseRecorder, expectedCode int)

func AssertResponseHeader

func AssertResponseHeader(t *testing.T, w *http.Response, header string, expected ...string)

func AssertResponseWriterHeader added in v1.4.3

func AssertResponseWriterHeader(t *testing.T, w http.ResponseWriter, header string, expected ...string)

func BuildExecutables added in v0.7.9

func BuildExecutables() (func(), error)

func ConfigureSecret added in v1.2.0

func ConfigureSecret()

func RootDir added in v0.8.0

func RootDir() string

func TestServerWithHandler

func TestServerWithHandler(url *regexp.Regexp, handler http.HandlerFunc) *httptest.Server

Types

type GitalyTestServer added in v1.4.0

type GitalyTestServer struct {
	sync.WaitGroup
	// contains filtered or unexported fields
}

func NewGitalyServer added in v1.4.0

func NewGitalyServer(finalMessageCode codes.Code) *GitalyTestServer

func (*GitalyTestServer) Cleanup

func (*GitalyTestServer) CommitDelta

func (*GitalyTestServer) CommitDiff

func (*GitalyTestServer) CommitIsAncestor

func (*GitalyTestServer) CommitPatch

func (*GitalyTestServer) CreateFork

func (*GitalyTestServer) CreateRepository

func (*GitalyTestServer) CreateRepositoryFromBundle

func (*GitalyTestServer) FetchRemote

func (*GitalyTestServer) FindLicense

func (*GitalyTestServer) FindMergeBase

func (*GitalyTestServer) Fsck

func (*GitalyTestServer) GarbageCollect

func (*GitalyTestServer) GetArchive

func (*GitalyTestServer) GetBlob

func (*GitalyTestServer) GetBlobs

func (*GitalyTestServer) GetSnapshot

func (*GitalyTestServer) HasLocalBranches

func (*GitalyTestServer) InfoRefsReceivePack added in v1.4.0

func (*GitalyTestServer) InfoRefsUploadPack added in v1.4.0

func (*GitalyTestServer) PostReceivePack added in v1.4.3

func (*GitalyTestServer) PostUploadPack added in v1.4.3

func (*GitalyTestServer) RawDiff

func (*GitalyTestServer) RawPatch

func (*GitalyTestServer) RepackFull

func (*GitalyTestServer) RepositoryExists

func (*GitalyTestServer) RepositorySize

func (*GitalyTestServer) WriteConfig

func (*GitalyTestServer) WriteRef

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL