e2e

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InputRegex  = regexp.MustCompile("(input|source).*")
	OutputRegex = regexp.MustCompile(".*/?(output|target).*")
)

Functions

func FindInput

func FindInput(fs afero.Fs, path string) (string, error)

func ListTests

func ListTests(fs afero.Fs, path string) (iter.Seq[*Test], error)

Types

type Assertion

type Assertion func(*Test, afero.Fs)

type Option

type Option func(*Options)

func Expect

func Expect(name string, assertions ...Assertion) Option

type Options

type Options struct {
	// contains filtered or unexported fields
}

type Suite

type Suite interface {
	Name() string
	Tests() iter.Seq2[*Test, []Assertion]
}

func ReadLocalGitSuite

func ReadLocalGitSuite(ctx context.Context, fs afero.Fs, name string) (Suite, error)

func ReadLocalGitTests

func ReadLocalGitTests(
	ctx context.Context,
	fs afero.Fs,
	name string,
	assertions map[string][]Assertion,
) (Suite, error)

func ReadSuite

func ReadSuite(fs afero.Fs, path string, options ...Option) (Suite, error)

func ReadTests

func ReadTests(fs afero.Fs, path string, assertions map[string][]Assertion) (Suite, error)

type Test

type Test struct {
	Name     string
	Spec     *tdlv1alpha1.Spec
	Expected afero.Fs
}

func ReadTest

func ReadTest(fs afero.Fs, path string) (*Test, error)

Jump to

Keyboard shortcuts

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