Documentation
¶
Overview ¶
Package ocitest drives a Docker Registry v2 endpoint with the push, pull, delete and listing calls a registry client makes, so each registry emulator proves the same conformance behaviour.
Index ¶
Constants ¶
const ManifestMediaType = "application/vnd.docker.distribution.manifest.v2+json"
ManifestMediaType is the Docker schema 2 manifest type the helpers push.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run executes the conformance checks against c. Repositories are named prefix+"<case>", so a registry that scopes repositories (for example project/repo/) passes its scope as prefix. catalog is the repository listing path, empty when there is none; names in that listing carry listedPrefix instead of prefix.
Types ¶
type Client ¶
type Client struct {
T *testing.T
// HTTP performs the calls; nil uses a client without keep-alives.
HTTP *http.Client
// Prepare adds credentials (and anything else) to each request.
Prepare func(*http.Request)
// Base is the scheme and host:port requests are sent to.
Base string
// Host overrides the Host header, for host-routed registries.
Host string
}
Client talks to one registry endpoint.
func (Client) Names ¶
Names pages through a listing URL with n per page, following Link headers, and returns every name.