helpers

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package helpers implements several helpers for testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPHealthCheck added in v0.2.0

func HTTPHealthCheck(addr string) func() error

HTTPHealthCheck returns a function for ginkgo "Eventually" poll it repeatedly to check whether a HTTP server is ready.

func HealthCheck

func HealthCheck(addr string, connTimeout time.Duration, rpcTimeout time.Duration, opts ...grpc.DialOption) func() error

HealthCheck returns a function for ginkgo "Eventually" poll it repeatedly to check whether a gRPC server is ready.

func TimeRange added in v0.2.0

func TimeRange(args Args, shardContext SharedContext) *modelv1.TimeRange

TimeRange returns a modelv1.TimeRange based on Args and SharedContext.

func UnmarshalYAML added in v0.2.0

func UnmarshalYAML(ii []byte, m proto.Message)

UnmarshalYAML decodes YAML raw bytes to proto.Message.

Types

type Args added in v0.2.0

type Args struct {
	Begin     *timestamppb.Timestamp
	End       *timestamppb.Timestamp
	Input     string
	Want      string
	Offset    time.Duration
	Duration  time.Duration
	WantEmpty bool
	WantErr   bool
}

Args is a wrapper seals all necessary info for table specs.

type SharedContext added in v0.2.0

type SharedContext struct {
	Connection *grpclib.ClientConn
	BaseTime   time.Time
}

SharedContext is the context shared between test cases in the integration testing.

Jump to

Keyboard shortcuts

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