registry_testhelpers

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithAuth added in v0.15.0

func WithAuth(username, password string) func(*options)

Types

type Option added in v0.15.0

type Option func(*options)

type RegistryContainer

type RegistryContainer struct {
	Container *registry.RegistryContainer
	// contains filtered or unexported fields
}

func StartTestRegistry

func StartTestRegistry(t *testing.T, opts ...Option) *RegistryContainer

StartTestRegistry starts a test registry container on a random local port populated with image data from the testdata/docker directory. It returns a RegistryContainer that can be used to inspect the registry and generate absolute image references. It will automatically be cleaned when the test finishes. This is safe to run concurrently across multiple tests.

func (*RegistryContainer) CloneRepo added in v0.15.0

func (c *RegistryContainer) CloneRepo(t *testing.T, existingRepo, newRepo string) string

func (*RegistryContainer) CloneRepoForTest added in v0.15.0

func (c *RegistryContainer) CloneRepoForTest(t *testing.T, repo string) string

func (*RegistryContainer) ImageExists added in v0.15.0

func (c *RegistryContainer) ImageExists(t *testing.T, ref string) error

func (*RegistryContainer) ImageRef

func (c *RegistryContainer) ImageRef(ref string) string

func (*RegistryContainer) ImageRefForTest

func (c *RegistryContainer) ImageRefForTest(t *testing.T, label string) string

func (*RegistryContainer) RegistryHost added in v0.15.0

func (c *RegistryContainer) RegistryHost() string

Jump to

Keyboard shortcuts

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