module_test_runner

package
v1.53.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoStageResult = errors.New("stage result not found")
	ErrNoOutput      = errors.New("unable to find output")
)
View Source
var (
	ErrInvalidStageResultMimeType = errors.New("stage result expects mime-type of application/json")
)

Functions

func MustEncode added in v1.36.0

func MustEncode(data any) []byte

func NewTestJobContext added in v1.20.0

func NewTestJobContext(ctx context.Context, jobKey, correlationId, transactionId string, inputs Inputs) *sparkv1.JobContext

func WithSparkConfigJSON added in v1.24.0

func WithSparkConfigJSON(d []byte) sparkv1.Option

func WithSparkConfigYAML added in v1.24.0

func WithSparkConfigYAML(d []byte) sparkv1.Option

Types

type Input added in v1.36.0

type Input struct {
	Value    any
	MimeType codec.MimeType
}

type Inputs added in v1.36.0

type Inputs map[string]*Input

type Option added in v1.20.0

type Option = func(je *testOpts) *testOpts

func WithBasePath added in v1.20.0

func WithBasePath(configBasePath string) Option

type Outputs added in v1.20.0

type Outputs struct {
	sparkv1.ExecuteSparkOutput
}

func (*Outputs) Bind added in v1.20.0

func (o *Outputs) Bind(varName string, target any) error

type RunnerTest added in v1.20.0

type RunnerTest interface {
	sparkv1.StageTracker
	Execute(ctx *sparkv1.JobContext, opts ...sparkv1.Option) (*Outputs, error)
	ExecuteWithoutStageRetryOverride(ctx *sparkv1.JobContext, opts ...sparkv1.Option) (*Outputs, error)
}

RunnerTest Test Helper

func NewTestRunner added in v1.20.0

func NewTestRunner(t *testing.T, spark sparkv1.Spark, options ...Option) (RunnerTest, error)

Jump to

Keyboard shortcuts

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