e2e

package
v1.33.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// LatencyTest is used to check whether to do latency test for import group.
	LatencyTest = os.Getenv("LATENCY_TEST") == "true"
	// GenerateGolden is used to check whether generating golden.
	GenerateGolden = os.Getenv("GENERATE_GOLDEN") == "true"
)

Functions

func ReadJSON

func ReadJSON(dir, fname string, resp protoreflect.ProtoMessage) error

ReadJSON reads in the golden Json file.

func Setup

func Setup(option ...*TestOption) (pb.MixerClient, pb.ReconClient, error)

Setup creates local server and client.

func SetupBqOnly

func SetupBqOnly() (pb.MixerClient, pb.ReconClient, error)

SetupBqOnly creates local server and client with access to BigQuery only.

func TestDriver added in v1.33.0

func TestDriver(
	apiName string,
	opt *TestOption,
	testSuite func(pb.MixerClient, bool, bool)) error

TestDriver drives various tests based on environment flags.

func UpdateGolden

func UpdateGolden(v interface{}, root, fname string)

UpdateGolden updates the golden file for native typed response.

func UpdateProtoGolden

func UpdateProtoGolden(
	resp protoreflect.ProtoMessage, root string, fname string)

UpdateProtoGolden updates the golden file for protobuf response.

Types

type TestOption

type TestOption struct {
	UseCache       bool
	UseMemdb       bool
	UseImportGroup bool
}

TestOption holds the options for integration test.

Jump to

Keyboard shortcuts

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