registrytest

package
v0.69.2 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package registrytest provides utilities for testing with OCI registries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(t *testing.T) *httptest.Server

NewServer starts a test registry server with OCI 1.1 referrers support.

func PushRandomImage

func PushRandomImage(t *testing.T, registryHost, repo, tag string) (name.Reference, v1.Descriptor)

PushRandomImage pushes a random image to the registry and returns its reference and descriptor.

func PushReferrer

func PushReferrer(t *testing.T, registryHost, repo string, subjectDesc v1.Descriptor, artifactType string, content []byte)

PushReferrer pushes an artifact referrer to the registry attached to the subject image. The artifactType is used both as the config media type (for OCI 1.1 artifact type) and layer media type.

Types

This section is empty.

Jump to

Keyboard shortcuts

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