drifttest

package
v1.15.18 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileContains added in v1.2.0

func FileContains(t *testing.T, path string, expected string)

func FileContentMatches added in v1.2.0

func FileContentMatches(t *testing.T, path string, expected string)

func FileDoesNotContain added in v1.2.0

func FileDoesNotContain(t *testing.T, path string, expected string)

func FileIsYAML added in v1.2.0

func FileIsYAML(t *testing.T, path string)

func OnlyGitChanges added in v1.2.0

func OnlyGitChanges(t *testing.T, paths ...string)

func ReasonableSampleFilesystem

func ReasonableSampleFilesystem() *files.System[*files.State]

func TestRunConstructor

func TestRunConstructor(t *testing.T, config string, fs *files.System[*files.State], postRunVerification func(t *testing.T, items *Items)) func(cfg TestRunForConfig) *TestRun

func WithRun

func WithRun(config string, fs *files.System[*files.State], postRunVerification func(t *testing.T, items *Items)) func(t *testing.T)

func WithRunAndModule added in v1.4.0

func WithRunAndModule(config string, fs *files.System[*files.State], postRunVerification func(t *testing.T, items *Items), module fx.Option) func(t *testing.T)

Types

type Items

type Items struct {
	TestRun *TestRun
}

type TestRun

type TestRun struct {
	TestRunForConfig *TestRunForConfig
	T                *testing.T
	Filesystem       *files.System[*files.State]
	Config           string
	// contains filtered or unexported fields
}

func (*TestRun) MustExitCode

func (t *TestRun) MustExitCode(tes *testing.T, code int)

func (*TestRun) MustPrint

func (t *TestRun) MustPrint(tes *testing.T, str string)

func (*TestRun) Run

func (t *TestRun) Run()

func (*TestRun) SetupFiles

func (t *TestRun) SetupFiles()

type TestRunForConfig

type TestRunForConfig struct {
	fx.In
	Main     *syncerexec.RunSyncer
	TestStub osstub.OsStub
}

Jump to

Keyboard shortcuts

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