tests

package
v0.9.10 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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.

Types

type GRPCTestCase

type GRPCTestCase struct {
	Addr    string
	Timeout time.Duration
	Method  string
	Args    proto.Message

	ExpectError    error
	ExpectMetadata metadata.MD
	ExpectReply    proto.Message
}

type HTTPTestCase

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

Jump to

Keyboard shortcuts

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