Documentation ¶
Index ¶
- Variables
- func AssertPatchSeries(t *testing.T, blob []byte, expected ...string)
- func AssertResponseBody(t *testing.T, response *httptest.ResponseRecorder, expectedBody string)
- func AssertResponseBodyRegexp(t *testing.T, response *httptest.ResponseRecorder, expectedBody *regexp.Regexp)
- func AssertResponseCode(t *testing.T, response *httptest.ResponseRecorder, expectedCode int)
- func AssertResponseHeader(t *testing.T, w interface{}, header string, expected ...string)
- func AssertResponseWriterHeader(t *testing.T, w http.ResponseWriter, header string, expected ...string)
- func BuildExecutables() error
- func ConfigureSecret()
- func LoadFile(t *testing.T, filePath string) string
- func RootDir() string
- func TestServerWithHandler(url *regexp.Regexp, handler http.HandlerFunc) *httptest.Server
- type GitalyTestServer
- func (s *GitalyTestServer) ApplyGitattributes(context.Context, *gitalypb.ApplyGitattributesRequest) (*gitalypb.ApplyGitattributesResponse, error)
- func (s *GitalyTestServer) BackupCustomHooks(*gitalypb.BackupCustomHooksRequest, ...) error
- func (s *GitalyTestServer) CalculateChecksum(context.Context, *gitalypb.CalculateChecksumRequest) (*gitalypb.CalculateChecksumResponse, error)
- func (s *GitalyTestServer) Cleanup(context.Context, *gitalypb.CleanupRequest) (*gitalypb.CleanupResponse, error)
- func (s *GitalyTestServer) CommitDelta(in *gitalypb.CommitDeltaRequest, stream gitalypb.DiffService_CommitDeltaServer) error
- func (s *GitalyTestServer) CommitDiff(in *gitalypb.CommitDiffRequest, stream gitalypb.DiffService_CommitDiffServer) error
- func (s *GitalyTestServer) CommitIsAncestor(ctx context.Context, in *gitalypb.CommitIsAncestorRequest) (*gitalypb.CommitIsAncestorResponse, error)
- func (s *GitalyTestServer) CommitPatch(in *gitalypb.CommitPatchRequest, stream gitalypb.DiffService_CommitPatchServer) error
- func (s *GitalyTestServer) CreateBundle(*gitalypb.CreateBundleRequest, gitalypb.RepositoryService_CreateBundleServer) error
- func (s *GitalyTestServer) CreateFork(context.Context, *gitalypb.CreateForkRequest) (*gitalypb.CreateForkResponse, error)
- func (s *GitalyTestServer) CreateRepository(context.Context, *gitalypb.CreateRepositoryRequest) (*gitalypb.CreateRepositoryResponse, error)
- func (s *GitalyTestServer) CreateRepositoryFromBundle(gitalypb.RepositoryService_CreateRepositoryFromBundleServer) error
- func (s *GitalyTestServer) CreateRepositoryFromSnapshot(context.Context, *gitalypb.CreateRepositoryFromSnapshotRequest) (*gitalypb.CreateRepositoryFromSnapshotResponse, error)
- func (s *GitalyTestServer) CreateRepositoryFromURL(context.Context, *gitalypb.CreateRepositoryFromURLRequest) (*gitalypb.CreateRepositoryFromURLResponse, error)
- func (s *GitalyTestServer) DeleteConfig(context.Context, *gitalypb.DeleteConfigRequest) (*gitalypb.DeleteConfigResponse, error)
- func (s *GitalyTestServer) DiffStats(*gitalypb.DiffStatsRequest, gitalypb.DiffService_DiffStatsServer) error
- func (s *GitalyTestServer) Exists(context.Context, *gitalypb.RepositoryExistsRequest) (*gitalypb.RepositoryExistsResponse, error)
- func (s *GitalyTestServer) FetchRemote(context.Context, *gitalypb.FetchRemoteRequest) (*gitalypb.FetchRemoteResponse, error)
- func (s *GitalyTestServer) FetchSourceBranch(context.Context, *gitalypb.FetchSourceBranchRequest) (*gitalypb.FetchSourceBranchResponse, error)
- func (s *GitalyTestServer) FindLicense(context.Context, *gitalypb.FindLicenseRequest) (*gitalypb.FindLicenseResponse, error)
- func (s *GitalyTestServer) FindMergeBase(context.Context, *gitalypb.FindMergeBaseRequest) (*gitalypb.FindMergeBaseResponse, error)
- func (s *GitalyTestServer) Fsck(context.Context, *gitalypb.FsckRequest) (*gitalypb.FsckResponse, error)
- func (s *GitalyTestServer) GarbageCollect(context.Context, *gitalypb.GarbageCollectRequest) (*gitalypb.GarbageCollectResponse, error)
- func (s *GitalyTestServer) GetAllLFSPointers(*gitalypb.GetAllLFSPointersRequest, ...) error
- func (s *GitalyTestServer) GetArchive(in *gitalypb.GetArchiveRequest, ...) error
- func (s *GitalyTestServer) GetBlob(in *gitalypb.GetBlobRequest, stream gitalypb.BlobService_GetBlobServer) error
- func (s *GitalyTestServer) GetBlobs(in *gitalypb.GetBlobsRequest, stream gitalypb.BlobService_GetBlobsServer) error
- func (s *GitalyTestServer) GetInfoAttributes(*gitalypb.GetInfoAttributesRequest, ...) error
- func (s *GitalyTestServer) GetLFSPointers(*gitalypb.GetLFSPointersRequest, gitalypb.BlobService_GetLFSPointersServer) error
- func (s *GitalyTestServer) GetNewLFSPointers(*gitalypb.GetNewLFSPointersRequest, ...) error
- func (s *GitalyTestServer) GetRawChanges(*gitalypb.GetRawChangesRequest, gitalypb.RepositoryService_GetRawChangesServer) error
- func (s *GitalyTestServer) GetSnapshot(in *gitalypb.GetSnapshotRequest, ...) error
- func (s *GitalyTestServer) HasLocalBranches(ctx context.Context, in *gitalypb.HasLocalBranchesRequest) (*gitalypb.HasLocalBranchesResponse, error)
- func (s *GitalyTestServer) InfoRefsReceivePack(in *gitalypb.InfoRefsRequest, ...) error
- func (s *GitalyTestServer) InfoRefsUploadPack(in *gitalypb.InfoRefsRequest, ...) error
- func (s *GitalyTestServer) IsRebaseInProgress(context.Context, *gitalypb.IsRebaseInProgressRequest) (*gitalypb.IsRebaseInProgressResponse, error)
- func (s *GitalyTestServer) IsSquashInProgress(context.Context, *gitalypb.IsSquashInProgressRequest) (*gitalypb.IsSquashInProgressResponse, error)
- func (s *GitalyTestServer) PostReceivePack(stream gitalypb.SmartHTTPService_PostReceivePackServer) error
- func (s *GitalyTestServer) PostUploadPack(stream gitalypb.SmartHTTPService_PostUploadPackServer) error
- func (s *GitalyTestServer) RawDiff(in *gitalypb.RawDiffRequest, stream gitalypb.DiffService_RawDiffServer) error
- func (s *GitalyTestServer) RawPatch(in *gitalypb.RawPatchRequest, stream gitalypb.DiffService_RawPatchServer) error
- func (s *GitalyTestServer) RepackFull(context.Context, *gitalypb.RepackFullRequest) (*gitalypb.RepackFullResponse, error)
- func (s *GitalyTestServer) RepackIncremental(context.Context, *gitalypb.RepackIncrementalRequest) (*gitalypb.RepackIncrementalResponse, error)
- func (s *GitalyTestServer) RepositoryExists(context.Context, *gitalypb.RepositoryExistsRequest) (*gitalypb.RepositoryExistsResponse, error)
- func (s *GitalyTestServer) RepositorySize(context.Context, *gitalypb.RepositorySizeRequest) (*gitalypb.RepositorySizeResponse, error)
- func (s *GitalyTestServer) RestoreCustomHooks(gitalypb.RepositoryService_RestoreCustomHooksServer) error
- func (s *GitalyTestServer) SearchFilesByContent(*gitalypb.SearchFilesByContentRequest, ...) error
- func (s *GitalyTestServer) SearchFilesByName(*gitalypb.SearchFilesByNameRequest, ...) error
- func (s *GitalyTestServer) SetConfig(context.Context, *gitalypb.SetConfigRequest) (*gitalypb.SetConfigResponse, error)
- func (s *GitalyTestServer) WriteConfig(context.Context, *gitalypb.WriteConfigRequest) (*gitalypb.WriteConfigResponse, error)
- func (s *GitalyTestServer) WriteRef(context.Context, *gitalypb.WriteRefRequest) (*gitalypb.WriteRefResponse, error)
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
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 AssertResponseCode ¶
func AssertResponseCode(t *testing.T, response *httptest.ResponseRecorder, expectedCode int)
func AssertResponseHeader ¶
func AssertResponseWriterHeader ¶ added in v1.4.3
func BuildExecutables ¶ added in v0.7.9
func BuildExecutables() error
func ConfigureSecret ¶ added in v1.2.0
func ConfigureSecret()
func TestServerWithHandler ¶
Types ¶
type GitalyTestServer ¶ added in v1.4.0
func NewGitalyServer ¶ added in v1.4.0
func NewGitalyServer(finalMessageCode codes.Code) *GitalyTestServer
func (*GitalyTestServer) ApplyGitattributes ¶
func (s *GitalyTestServer) ApplyGitattributes(context.Context, *gitalypb.ApplyGitattributesRequest) (*gitalypb.ApplyGitattributesResponse, error)
func (*GitalyTestServer) BackupCustomHooks ¶
func (s *GitalyTestServer) BackupCustomHooks(*gitalypb.BackupCustomHooksRequest, gitalypb.RepositoryService_BackupCustomHooksServer) error
func (*GitalyTestServer) CalculateChecksum ¶
func (s *GitalyTestServer) CalculateChecksum(context.Context, *gitalypb.CalculateChecksumRequest) (*gitalypb.CalculateChecksumResponse, error)
func (*GitalyTestServer) Cleanup ¶
func (s *GitalyTestServer) Cleanup(context.Context, *gitalypb.CleanupRequest) (*gitalypb.CleanupResponse, error)
func (*GitalyTestServer) CommitDelta ¶
func (s *GitalyTestServer) CommitDelta(in *gitalypb.CommitDeltaRequest, stream gitalypb.DiffService_CommitDeltaServer) error
func (*GitalyTestServer) CommitDiff ¶
func (s *GitalyTestServer) CommitDiff(in *gitalypb.CommitDiffRequest, stream gitalypb.DiffService_CommitDiffServer) error
func (*GitalyTestServer) CommitIsAncestor ¶
func (s *GitalyTestServer) CommitIsAncestor(ctx context.Context, in *gitalypb.CommitIsAncestorRequest) (*gitalypb.CommitIsAncestorResponse, error)
func (*GitalyTestServer) CommitPatch ¶
func (s *GitalyTestServer) CommitPatch(in *gitalypb.CommitPatchRequest, stream gitalypb.DiffService_CommitPatchServer) error
func (*GitalyTestServer) CreateBundle ¶
func (s *GitalyTestServer) CreateBundle(*gitalypb.CreateBundleRequest, gitalypb.RepositoryService_CreateBundleServer) error
func (*GitalyTestServer) CreateFork ¶
func (s *GitalyTestServer) CreateFork(context.Context, *gitalypb.CreateForkRequest) (*gitalypb.CreateForkResponse, error)
func (*GitalyTestServer) CreateRepository ¶
func (s *GitalyTestServer) CreateRepository(context.Context, *gitalypb.CreateRepositoryRequest) (*gitalypb.CreateRepositoryResponse, error)
func (*GitalyTestServer) CreateRepositoryFromBundle ¶
func (s *GitalyTestServer) CreateRepositoryFromBundle(gitalypb.RepositoryService_CreateRepositoryFromBundleServer) error
func (*GitalyTestServer) CreateRepositoryFromSnapshot ¶
func (s *GitalyTestServer) CreateRepositoryFromSnapshot(context.Context, *gitalypb.CreateRepositoryFromSnapshotRequest) (*gitalypb.CreateRepositoryFromSnapshotResponse, error)
func (*GitalyTestServer) CreateRepositoryFromURL ¶
func (s *GitalyTestServer) CreateRepositoryFromURL(context.Context, *gitalypb.CreateRepositoryFromURLRequest) (*gitalypb.CreateRepositoryFromURLResponse, error)
func (*GitalyTestServer) DeleteConfig ¶
func (s *GitalyTestServer) DeleteConfig(context.Context, *gitalypb.DeleteConfigRequest) (*gitalypb.DeleteConfigResponse, error)
func (*GitalyTestServer) DiffStats ¶
func (s *GitalyTestServer) DiffStats(*gitalypb.DiffStatsRequest, gitalypb.DiffService_DiffStatsServer) error
func (*GitalyTestServer) Exists ¶
func (s *GitalyTestServer) Exists(context.Context, *gitalypb.RepositoryExistsRequest) (*gitalypb.RepositoryExistsResponse, error)
func (*GitalyTestServer) FetchRemote ¶
func (s *GitalyTestServer) FetchRemote(context.Context, *gitalypb.FetchRemoteRequest) (*gitalypb.FetchRemoteResponse, error)
func (*GitalyTestServer) FetchSourceBranch ¶
func (s *GitalyTestServer) FetchSourceBranch(context.Context, *gitalypb.FetchSourceBranchRequest) (*gitalypb.FetchSourceBranchResponse, error)
func (*GitalyTestServer) FindLicense ¶
func (s *GitalyTestServer) FindLicense(context.Context, *gitalypb.FindLicenseRequest) (*gitalypb.FindLicenseResponse, error)
func (*GitalyTestServer) FindMergeBase ¶
func (s *GitalyTestServer) FindMergeBase(context.Context, *gitalypb.FindMergeBaseRequest) (*gitalypb.FindMergeBaseResponse, error)
func (*GitalyTestServer) Fsck ¶
func (s *GitalyTestServer) Fsck(context.Context, *gitalypb.FsckRequest) (*gitalypb.FsckResponse, error)
func (*GitalyTestServer) GarbageCollect ¶
func (s *GitalyTestServer) GarbageCollect(context.Context, *gitalypb.GarbageCollectRequest) (*gitalypb.GarbageCollectResponse, error)
func (*GitalyTestServer) GetAllLFSPointers ¶
func (s *GitalyTestServer) GetAllLFSPointers(*gitalypb.GetAllLFSPointersRequest, gitalypb.BlobService_GetAllLFSPointersServer) error
func (*GitalyTestServer) GetArchive ¶
func (s *GitalyTestServer) GetArchive(in *gitalypb.GetArchiveRequest, stream gitalypb.RepositoryService_GetArchiveServer) error
func (*GitalyTestServer) GetBlob ¶
func (s *GitalyTestServer) GetBlob(in *gitalypb.GetBlobRequest, stream gitalypb.BlobService_GetBlobServer) error
func (*GitalyTestServer) GetBlobs ¶
func (s *GitalyTestServer) GetBlobs(in *gitalypb.GetBlobsRequest, stream gitalypb.BlobService_GetBlobsServer) error
func (*GitalyTestServer) GetInfoAttributes ¶
func (s *GitalyTestServer) GetInfoAttributes(*gitalypb.GetInfoAttributesRequest, gitalypb.RepositoryService_GetInfoAttributesServer) error
func (*GitalyTestServer) GetLFSPointers ¶
func (s *GitalyTestServer) GetLFSPointers(*gitalypb.GetLFSPointersRequest, gitalypb.BlobService_GetLFSPointersServer) error
func (*GitalyTestServer) GetNewLFSPointers ¶
func (s *GitalyTestServer) GetNewLFSPointers(*gitalypb.GetNewLFSPointersRequest, gitalypb.BlobService_GetNewLFSPointersServer) error
func (*GitalyTestServer) GetRawChanges ¶
func (s *GitalyTestServer) GetRawChanges(*gitalypb.GetRawChangesRequest, gitalypb.RepositoryService_GetRawChangesServer) error
func (*GitalyTestServer) GetSnapshot ¶
func (s *GitalyTestServer) GetSnapshot(in *gitalypb.GetSnapshotRequest, stream gitalypb.RepositoryService_GetSnapshotServer) error
func (*GitalyTestServer) HasLocalBranches ¶
func (s *GitalyTestServer) HasLocalBranches(ctx context.Context, in *gitalypb.HasLocalBranchesRequest) (*gitalypb.HasLocalBranchesResponse, error)
func (*GitalyTestServer) InfoRefsReceivePack ¶ added in v1.4.0
func (s *GitalyTestServer) InfoRefsReceivePack(in *gitalypb.InfoRefsRequest, stream gitalypb.SmartHTTPService_InfoRefsReceivePackServer) error
func (*GitalyTestServer) InfoRefsUploadPack ¶ added in v1.4.0
func (s *GitalyTestServer) InfoRefsUploadPack(in *gitalypb.InfoRefsRequest, stream gitalypb.SmartHTTPService_InfoRefsUploadPackServer) error
func (*GitalyTestServer) IsRebaseInProgress ¶
func (s *GitalyTestServer) IsRebaseInProgress(context.Context, *gitalypb.IsRebaseInProgressRequest) (*gitalypb.IsRebaseInProgressResponse, error)
func (*GitalyTestServer) IsSquashInProgress ¶
func (s *GitalyTestServer) IsSquashInProgress(context.Context, *gitalypb.IsSquashInProgressRequest) (*gitalypb.IsSquashInProgressResponse, error)
func (*GitalyTestServer) PostReceivePack ¶ added in v1.4.3
func (s *GitalyTestServer) PostReceivePack(stream gitalypb.SmartHTTPService_PostReceivePackServer) error
func (*GitalyTestServer) PostUploadPack ¶ added in v1.4.3
func (s *GitalyTestServer) PostUploadPack(stream gitalypb.SmartHTTPService_PostUploadPackServer) error
func (*GitalyTestServer) RawDiff ¶
func (s *GitalyTestServer) RawDiff(in *gitalypb.RawDiffRequest, stream gitalypb.DiffService_RawDiffServer) error
func (*GitalyTestServer) RawPatch ¶
func (s *GitalyTestServer) RawPatch(in *gitalypb.RawPatchRequest, stream gitalypb.DiffService_RawPatchServer) error
func (*GitalyTestServer) RepackFull ¶
func (s *GitalyTestServer) RepackFull(context.Context, *gitalypb.RepackFullRequest) (*gitalypb.RepackFullResponse, error)
func (*GitalyTestServer) RepackIncremental ¶
func (s *GitalyTestServer) RepackIncremental(context.Context, *gitalypb.RepackIncrementalRequest) (*gitalypb.RepackIncrementalResponse, error)
func (*GitalyTestServer) RepositoryExists ¶
func (s *GitalyTestServer) RepositoryExists(context.Context, *gitalypb.RepositoryExistsRequest) (*gitalypb.RepositoryExistsResponse, error)
func (*GitalyTestServer) RepositorySize ¶
func (s *GitalyTestServer) RepositorySize(context.Context, *gitalypb.RepositorySizeRequest) (*gitalypb.RepositorySizeResponse, error)
func (*GitalyTestServer) RestoreCustomHooks ¶
func (s *GitalyTestServer) RestoreCustomHooks(gitalypb.RepositoryService_RestoreCustomHooksServer) error
func (*GitalyTestServer) SearchFilesByContent ¶
func (s *GitalyTestServer) SearchFilesByContent(*gitalypb.SearchFilesByContentRequest, gitalypb.RepositoryService_SearchFilesByContentServer) error
func (*GitalyTestServer) SearchFilesByName ¶
func (s *GitalyTestServer) SearchFilesByName(*gitalypb.SearchFilesByNameRequest, gitalypb.RepositoryService_SearchFilesByNameServer) error
func (*GitalyTestServer) SetConfig ¶
func (s *GitalyTestServer) SetConfig(context.Context, *gitalypb.SetConfigRequest) (*gitalypb.SetConfigResponse, error)
func (*GitalyTestServer) WriteConfig ¶
func (s *GitalyTestServer) WriteConfig(context.Context, *gitalypb.WriteConfigRequest) (*gitalypb.WriteConfigResponse, error)
func (*GitalyTestServer) WriteRef ¶
func (s *GitalyTestServer) WriteRef(context.Context, *gitalypb.WriteRefRequest) (*gitalypb.WriteRefResponse, error)
Click to show internal directories.
Click to hide internal directories.