testutils

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEqualSequencedMap added in v0.2.1

func AssertEqualSequencedMap(t *testing.T, expected, actual SequencedMap)

func CreateBoolYamlNode

func CreateBoolYamlNode(value bool, line, column int) *yaml.Node

func CreateIntYamlNode

func CreateIntYamlNode(value int, line, column int) *yaml.Node

func CreateMapYamlNode

func CreateMapYamlNode(contents []*yaml.Node, line, column int) *yaml.Node

func CreateStringYamlNode

func CreateStringYamlNode(value string, line, column int) *yaml.Node

TODO use these more in tests

func DownloadFile added in v1.11.0

func DownloadFile(url, cacheEnvVar, cacheDirName string) (io.ReadCloser, error)

DownloadFile downloads a file from a URL and caches it to avoid re-downloading. Uses the provided cacheEnvVar for cache location, fallback to system temp dir. The cacheDirName is used as the subdirectory name under the cache directory.

Types

type SequencedMap added in v0.2.1

type SequencedMap interface {
	Len() int
	AllUntyped() iter.Seq2[any, any]
	GetUntyped(key any) (any, bool)
}

Jump to

Keyboard shortcuts

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