testruntime

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(t TestingT) *runtime.Runtime

New returns a runtime configured for use in tests.

func NewInstance

func NewInstance(t TestingT) (*runtime.Runtime, string)

NewInstance creates a runtime and an instance for use in tests. The instance's repo is a temp directory that will be cleared when the tests finish.

func NewInstanceForProject

func NewInstanceForProject(t TestingT, name string) (*runtime.Runtime, string)

NewInstanceForProject creates a runtime and an instance for use in tests. The passed name should match a test project in the testdata folder. You should not do mutable repo operations on the returned instance.

func NewInstanceWithModel

func NewInstanceWithModel(t TestingT, name, sql string) (*runtime.Runtime, string)

NewInstanceWithModel creates a runtime and an instance for use in tests. The passed model name and SQL SELECT statement will be loaded into the instance.

Types

type TestingT

type TestingT interface {
	Name() string
	TempDir() string
	FailNow()
	Errorf(format string, args ...interface{})
}

TestingT satisfies both *testing.T and *testing.B.

Jump to

Keyboard shortcuts

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