roundtrip

package
v0.0.0-...-8472c8c Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client defines client which can run round-trip of API test

func NewClient

func NewClient(host string) *Client

NewClient returns a client for roundtrip

func (*Client) DoRequest

func (c *Client) DoRequest(ctx *types.Context, rt *types.RoundTrip) (*http.Response, error)

DoRequest runs a round-trip of http

type ResponseHandler

type ResponseHandler interface {
	gomegatypes.GomegaMatcher

	// Variables returns variables defined in the round trip
	Variables() (map[string]template.Variable, error)
}

ResponseHandler defines handler for response It implements gomegatypes.GomegaMatcher

func MatchResponse

func MatchResponse(ctx *types.Context, rt *types.RoundTrip) (ResponseHandler, error)

MatchResponse returns a response matcher

type ResponseMatcher

type ResponseMatcher struct {
	// contains filtered or unexported fields
}

ResponseMatcher defines a matcher to match http response

func (*ResponseMatcher) FailureMessage

func (m *ResponseMatcher) FailureMessage(actual interface{}) (message string)

FailureMessage implements gomegatypes.GomegaMatcher

func (*ResponseMatcher) Match

func (m *ResponseMatcher) Match(actual interface{}) (bool, error)

Match implements gomegatypes.GomegaMatcher

func (*ResponseMatcher) NegatedFailureMessage

func (m *ResponseMatcher) NegatedFailureMessage(actual interface{}) (message string)

NegatedFailureMessage implements gomegatypes.GomegaMatcher

func (*ResponseMatcher) Variables

func (m *ResponseMatcher) Variables() (map[string]template.Variable, error)

Variables returns variable of matcher

Jump to

Keyboard shortcuts

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