Documentation ¶
Index ¶
- Variables
- func CompareErrorMessages() cmp.Option
- func CompareLoggers() cmp.Option
- func ComparePGPKeys() cmp.Option
- func CompareRSAPrivateKeys() cmp.Option
- func ExportAll() cmp.Option
- func Golden(t *testing.T, golden, result string, filter ...PathFilter)
- func IgnoreFunctions() cmp.Option
- func JoinYAML(s ...string) []byte
- func Source(t *testing.T, s *source.Source, makeURL func(version, asset string) string)
- func SourceWant() []*source.Release
- func Target(t *testing.T, tgt target.Target, makeURL func(string) string, ...)
- func YAML(s string) []byte
- type PathFilter
- type TargetOption
Constants ¶
This section is empty.
Variables ¶
var Update, _ = strconv.ParseBool(os.Getenv("UPDATE_GOLDEN")) //nolint:gochecknoglobals
Update indicates whether golden files should be updated.
Functions ¶
func CompareErrorMessages ¶
CompareErrorMessages compares errors by message.
func CompareLoggers ¶
CompareLoggers compares instances of log.Logger.
func ComparePGPKeys ¶
ComparePGPKeys compares PGP keys' fingerprints.
func CompareRSAPrivateKeys ¶
CompareRSAPrivateKeys compares RSA private keys.
func Golden ¶
func Golden(t *testing.T, golden, result string, filter ...PathFilter)
Golden compares the result directory to the golden directory and updates the golden directory if the UPDATE_GOLDEN environment variable is set.
func SourceWant ¶
Types ¶
type PathFilter ¶
func Ignore ¶
func Ignore(globs ...string) PathFilter
Ignore returns a PathFilter that ignores files matching the given globs.
type TargetOption ¶
type TargetOption func(*targetOptions)
func WithDelay ¶
func WithDelay(d time.Duration) TargetOption
WithDelay adds a delay between writing, updating & reading, to allow for services where the changes aren't available instantly.
func WithIgnoreRemoveNotFound ¶
func WithIgnoreRemoveNotFound() TargetOption
WithIgnoreRemoveNotFound disables testing if removing a non-existent file returns an error.