tests

package
v0.9.13 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunETCDTestCase added in v0.9.11

func RunETCDTestCase(tc ETCDTestCase)

RunETCDTestCase runs a test case against the given handler.

func RunGRPCTestCase

func RunGRPCTestCase(gtc GRPCTestCase)

RunGRPCTestCase runs a test case against the given handler.

func RunHTTPTestCase

func RunHTTPTestCase(htc HTTPTestCase)

RunHTTPTestCase runs a test case against the given handler.

func RunRedisTestCase added in v0.9.11

func RunRedisTestCase(rtc RedisTestCase)

RunRedisTestCase runs a test case against the given handler.

Types

type ETCDTestCase added in v0.9.11

type ETCDTestCase struct {
	Conf *etcdv3.Config
	DoFn func(registry.Registry) (interface{}, error)

	ExpectError error
	ExpectReply interface{}
}

type GRPCTestCase

type GRPCTestCase struct {
	Conf   *grpc.Config
	Method string
	Args   proto.Message

	ExpectError    error
	ExpectMetadata metadata.MD
	ExpectReply    proto.Message
}

type HTTPTestCase

type HTTPTestCase struct {
	Conf         *jresty.Config
	Method       string
	Path         string
	Body         string
	Timeout      time.Duration
	Header       map[string]string
	Query        string
	ExpectHeader http.Header
	ExpectStatus int
	ExpectBody   string
}

type RedisTestCase added in v0.9.11

type RedisTestCase struct {
	Conf     *redis.Config
	Args     []interface{}
	Timeout  time.Duration
	OnMaster bool

	ExpectError  error
	ExpectResult interface{}
}

Jump to

Keyboard shortcuts

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