testutils

package
v0.19.10 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LaunchRegistry

func LaunchRegistry(ctx context.Context) string

LaunchRegistry sets up testcontainer based on the `registry` image and returns the server's URI.

func StorageFromFiles

func StorageFromFiles(ctx context.Context, rootDir string, files []FileDescription) (oras.ReadOnlyTarget, error)

StorageFromFiles creates an oras.ReadOnlyTarget that stores the given files.

Types

type FileDescription

type FileDescription struct {
	// Name of the file.
	Name string
	// Data of the file.
	Data []byte
	// MediaType of the file.
	MediaType string
	// Tag of the file.
	Tag string
	// NeedsUnpack indicates if it is an archived file or not.
	NeedsUnpack bool
}

FileDescription represents a file that is stored as an OCI image.

Jump to

Keyboard shortcuts

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