testutil

package
v0.0.0-...-32448d8 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Test

func Test(t TestT, ts TestCase)

Types

type Operation

type Operation func(req handler.Request) handler.ProgressEvent

type TestCase

type TestCase struct {
	Name        string
	Steps       []TestStep
	TestHandler TestHandler
}

type TestCheckFunc

type TestCheckFunc func(model interface{}) error

func ComposeTestCheckFunc

func ComposeTestCheckFunc(fs ...TestCheckFunc) TestCheckFunc

func TestCheckResourceAttr

func TestCheckResourceAttr(key string, value interface{}) TestCheckFunc

type TestStep

type TestStep struct {
	Config string
	Check  TestCheckFunc
}

type TestT

type TestT interface {
	Error(args ...interface{})
	Fatal(args ...interface{})
	Skip(args ...interface{})
	Name() string
	Parallel()
}

TestT is the interface used to handle the test lifecycle of a test.

Users should just use a *testing.T object, which implements this.

Jump to

Keyboard shortcuts

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