stallregistry

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package stallregistry serves an OCI registry that accepts every request and stops answering it (#697).

Index

Constants

View Source
const BodySize = 500

BodySize is the Content-Length of each response StartBody stalls.

Variables

This section is empty.

Functions

func Start

func Start(t *testing.T) (host string, requests func(repo string) int)

Start serves the registry over TLS until the test ends and returns its host and the count of requests for a repository; a request waits until its client abandons it or the test ends. The registry client copies http.DefaultTransport's TLS config (httpx.Transport), so Start trusts the registry there, and gives the test an empty credential store: the test must not run in parallel with another one.

func StartBody

func StartBody(t *testing.T, manifest []byte) (host string)

StartBody is Start for a registry that sends each response's headers and the first byte of its BodySize-byte body, then nothing more. A GET of manifest's digest gets manifest whole, so a pull reaches the blobs it names.

Types

This section is empty.

Jump to

Keyboard shortcuts

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