Documentation ¶
Index ¶
- Constants
- 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 *http.Response, header string, expected ...string)
- func AssertResponseWriterHeader(t *testing.T, w http.ResponseWriter, header string, expected ...string)
- func BuildExecutables() (func(), error)
- func ConfigureSecret()
- func RootDir() string
- func TestServerWithHandler(url *regexp.Regexp, handler http.HandlerFunc) *httptest.Server
- type GitalyTestServer
- func (s *GitalyTestServer) InfoRefsReceivePack(in *pb.InfoRefsRequest, stream pb.SmartHTTP_InfoRefsReceivePackServer) error
- func (s *GitalyTestServer) InfoRefsUploadPack(in *pb.InfoRefsRequest, stream pb.SmartHTTP_InfoRefsUploadPackServer) error
- func (s *GitalyTestServer) PostReceivePack(stream pb.SmartHTTP_PostReceivePackServer) error
- func (s *GitalyTestServer) PostUploadPack(stream pb.SmartHTTP_PostUploadPackServer) error
Constants ¶
View Source
const GitalyInfoRefsResponseMock = "Mock Gitaly InfoRefsResponse data"
Variables ¶
View Source
var GitalyReceivePackResponseMock []byte
View Source
var 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() (func(), error)
func ConfigureSecret ¶ added in v1.2.0
func ConfigureSecret()
func TestServerWithHandler ¶
Types ¶
type GitalyTestServer ¶ added in v1.4.0
type GitalyTestServer struct{}
func NewGitalyServer ¶ added in v1.4.0
func NewGitalyServer() *GitalyTestServer
func (*GitalyTestServer) InfoRefsReceivePack ¶ added in v1.4.0
func (s *GitalyTestServer) InfoRefsReceivePack(in *pb.InfoRefsRequest, stream pb.SmartHTTP_InfoRefsReceivePackServer) error
func (*GitalyTestServer) InfoRefsUploadPack ¶ added in v1.4.0
func (s *GitalyTestServer) InfoRefsUploadPack(in *pb.InfoRefsRequest, stream pb.SmartHTTP_InfoRefsUploadPackServer) error
func (*GitalyTestServer) PostReceivePack ¶ added in v1.4.3
func (s *GitalyTestServer) PostReceivePack(stream pb.SmartHTTP_PostReceivePackServer) error
func (*GitalyTestServer) PostUploadPack ¶ added in v1.4.3
func (s *GitalyTestServer) PostUploadPack(stream pb.SmartHTTP_PostUploadPackServer) error
Click to show internal directories.
Click to hide internal directories.