testhelpers

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package testhelpers provides utility functions for to be used in tests.

Index

Constants

View Source
const (
	IntegrationTestingVarName = "INTEGRATION_TEST"
	RegistryHostVarName       = "REGISTRY_HOST"
	RegistryAuthHostVarName   = "REGISTRY_AUTH_HOST"
	RegistryUsernameVarName   = "REGISTRY_USERNAME"
	RegistryPasswordVarName   = "REGISTRY_PASSWORD"
)

These constants are duplicated in .dagger/common/constants.go. Make sure to update both files when changing these values.

Variables

This section is empty.

Functions

func LoadFromFile

func LoadFromFile[T interface{}](t *testing.T, path string) *T

LoadFromFile is a helper function to read the specified file and unmarshal it into the provided type T.

func LoadResourceList

func LoadResourceList(t *testing.T, krmInputPath, itemsPath string) []*kyaml.RNode

LoadResourceList is a helper function to read the items file from the specified directory. It returns a slice of RNodes representing the input and the items (as in an actual run of a KRM function).

func PushDirectoryToOCIRegistryT added in v0.2.3

func PushDirectoryToOCIRegistryT(t *testing.T, reference, rootDirectory, artifactType, tag string, client remote.Client, plainHTTP bool) ocispec.Descriptor

PushDirectoryToOCIRegistryT is a test helper that pushes the contents of a directory to an OCI registry.

Types

This section is empty.

Jump to

Keyboard shortcuts

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