test

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	Valid bool
	Msg   string
	// contains filtered or unexported fields
}

type Runner

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

func NewRunner

func NewRunner(path string, descs map[string]*manifest.ModuleDescriptor, verbose bool, logger *zap.Logger) (*Runner, error)

func (*Runner) LogResults

func (r *Runner) LogResults()

func (*Runner) Test

func (r *Runner) Test(
	ctx context.Context,
	output *pbsubstreamsrpc.MapModuleOutput,
	debugMapOutputs []*pbsubstreamsrpc.MapModuleOutput,
	debugStoreOutputs []*pbsubstreamsrpc.StoreModuleOutput,
	clock *pbsubstreams.Clock,
) error

type Spec

type Spec struct {
	Tests []*TestConfig `json:"tests"`
}

type StorageDelta

type StorageDelta struct {
	Operation string           `json:"op"`
	Ordinal   uint64           `json:"ordinal"`
	Key       string           `json:"key"`
	OldValue  *json.RawMessage `json:"old,omitempty"`
	NewValue  *json.RawMessage `json:"new,omitempty"`
}

type Test

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

type TestConfig

type TestConfig struct {
	Module string `json:"module" yaml:"module"`
	Block  uint64 `json:"block" yaml:"block"`
	Path   string `json:"path" yaml:"path"`
	Expect string `json:"expect" yaml:"expect"`
	Op     string `json:"op,omitempty" yaml:"op"`
	Args   string `json:"args,omitempty" yaml:"args"`
}

func (*TestConfig) Test

func (t *TestConfig) Test(idx int) (*Test, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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