Documentation
¶
Overview ¶
Package registryfixture assembles the real server for registry protocol suites. Docker and Helm OCI use the same repository, auth and blob-signing boundary without importing root-package test helpers.
Role ¶
Test support, outside the modules, for test/server/artifacts/docker and test/server/artifacts/helmoci.
Inputs ¶
- The production router from test/server/support/harness (app.NewRouter), an in-memory store and a file-system blob store, and the seeding of test/server/support.
- Callbacks that adjust the server configuration once the stores and authentication are ready.
Outputs ¶
- World, from New: the router with the users reader, deployer and user; local, remote and virtual repositories; anonymous read access when asked for; and a blob store that signs download URLs for the storage route.
References ¶
- Decision 0031: docs/research/decisions/0031-docker-oci-registry.md.
- docs/testing/server-test-ownership.md: how CI selection gives the package an owner.
- https://github.com/weaveplatform/artifactweave/issues/673
Status ¶
Implemented P9b (issue 673).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type World ¶
World is the production router over an in-memory store and a file-system blob store, built by New for one test. Do sends requests to Handler; DB and Blobs let a test seed state or check what a request left behind. Blobs signs download URLs for the storage route, as a cloud blob store would.
func New ¶
New builds the same full-router item world used by the root registry tests. The tune callbacks run after stores and authentication are ready.
func (*World) Do ¶
func (w *World) Do(method, path, as, body string, headers ...string) *httptest.ResponseRecorder
Do sends a request to the world's router as the user as, with the password "pw" over Basic, or without credentials when as is empty. headers are name and value pairs; a trailing name without a value is ignored.