testmanager

package
v0.0.0-...-c8e38eb Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config map[string]any

func (Config) Bool

func (c Config) Bool(key string) (value bool, ok bool)

func (Config) Int

func (c Config) Int(key string) (value int, ok bool)

type CreateRunnerFunc

type CreateRunnerFunc[T any] func(ctx context.Context, config T, state map[string]any) (runners []Runner, close func(), opts []Option, err error)

type Hook

type Hook func(ctx context.Context)

type Manager

type Manager[T any] struct {
	// contains filtered or unexported fields
}

func New

func New[T any](t *testing.T, createRunners CreateRunnerFunc[T]) *Manager[T]

func (*Manager[T]) Run

func (m *Manager[T]) Run(ctx context.Context, dir fs.FS, skipDirs ...string) error

type Option

type Option func(t *testCase)

func WithBeforeHook

func WithBeforeHook(hook Hook) Option

type Runner

type Runner interface {
	Ext() string
	Run(ctx context.Context, logf func(format string, args ...any), body []byte, state map[string]any) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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