ocitest

package
v0.22.2 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func NewTLSRegistry

func NewTLSRegistry(private bool, cloudProviderID string) (*Registry, error)

Creates an OCI registry to test tls/https.

Note: Helm uses Docker under the hood to handle OCI and Docker defaults to HTTP when it detects that the registry host is localhost or 127.0.0.1. In order to test OCI with a HTTPS server, we have to supply a "fake" host. We use a mock dns server to create an A record which binds declcd.io to 127.0.0.1. All OCI tests have to use declcd.io as host.

func StartCUERegistry

func StartCUERegistry(
	registryPath string,
) (*Registry, error)

func (*Registry) Addr

func (r *Registry) Addr() string

func (*Registry) Client

func (r *Registry) Client() *http.Client

func (*Registry) Close

func (r *Registry) Close()

func (*Registry) OCIClient

func (r *Registry) OCIClient() *modregistry.Client

func (*Registry) URL

func (r *Registry) URL() string

Jump to

Keyboard shortcuts

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