Documentation
¶
Overview ¶
Package gitserver is a stand-in git remote for tests that must prove a token reached the forge it belongs to, without a network or a real forge.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Flaky ¶ added in v0.21.4
type Flaky struct {
// Fails is asked of each request, numbered from 1, before it is served.
Fails func(n int, r *http.Request) bool
// Status is the answer a failed request gets.
Status int
// contains filtered or unexported fields
}
Flaky serves a repository on disk over git's smart HTTP, and answers Status instead to each request Fails picks.
The git side is go-git's own server rather than git http-backend, which Wolfi's git, the CI image's, does not ship. A shallow clone gets the whole history.
Click to show internal directories.
Click to hide internal directories.