framework

package
v0.0.0-...-4f50ef5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunETCDTestCase

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

func RunRedisTestCase(rtc RedisTestCase)

RunRedisTestCase runs a test case against the given handler.

Types

type ETCDTestCase

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

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