testutils

package
v0.0.0-...-fe60514 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckErrors

func CheckErrors(t *testing.T, name string, expectedErrs []error, actualErr error)

func CheckOutput

func CheckOutput(t *testing.T, name string,
	expected any, actual any,
)

func CheckOutputWithError

func CheckOutputWithError(t *testing.T, name string,
	expected any, expectedErr error,
	actual any, actualErr error,
)

Types

type FileData

type FileData []byte

func DataFromFile

func DataFromFile(t *testing.T, testFileName string) FileData

DataFromFile is used for server mocking. Files must be located under ./test directory relative to the test runner.

type ParallelRunner

type ParallelRunner[C any] struct {
	FilePath  string
	TestTitle string
	Function  func(ctx context.Context, conn C, filePath string) (string, error)
}

type ParallelRunners

type ParallelRunners[C any] []ParallelRunner[C]

func (ParallelRunners[C]) Run

func (r ParallelRunners[C]) Run(ctx context.Context, conn C) []string

Run will execute test suites in parallel. Note: filePath must be neighbouring to the caller of this method.

Jump to

Keyboard shortcuts

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