ocitest

package
v0.27.3 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithPrivate added in v0.27.0

func WithPrivate(enabled bool) private

func WithProvider added in v0.27.0

func WithProvider(providerID cloud.ProviderID) provider

Types

type Option added in v0.27.0

type Option interface {
	Apply(*options)
}

type Registry

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

func NewTLSRegistry

func NewTLSRegistry(private bool, cloudProviderID cloud.ProviderID) (*Registry, error)

Creates an OCI registry to test tls/https.

Note: Container libs use 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 navecd.io to 127.0.0.1. All OCI tests have to use navecd.io as host.

func NewTLSRegistryWithSchema added in v0.27.0

func NewTLSRegistryWithSchema(opts ...Option) (*Registry, error)

func (*Registry) AWS added in v0.27.0

func (r *Registry) AWS() *cloudtest.AWSEnvironment

func (*Registry) Addr

func (r *Registry) Addr() string

func (*Registry) Azure added in v0.27.0

func (r *Registry) Azure() *cloudtest.AzureEnvironment

func (*Registry) CUERegistryClient

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

func (*Registry) Client

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

func (*Registry) Close

func (r *Registry) Close()

func (*Registry) GCP added in v0.27.0

func (r *Registry) GCP() *cloudtest.GCPEnvironment

func (*Registry) Provider added in v0.27.0

func (r *Registry) Provider() cloud.ProviderID

func (*Registry) PushModuleFromPath added in v0.27.0

func (r *Registry) PushModuleFromPath(
	ctx context.Context,
	version module.Version,
	path string,
) error

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