Documentation
¶
Index ¶
- type APITester
- func (a *APITester) Authorize(token string)
- func (a *APITester) CompareBody(t *testing.T, expected string)
- func (a *APITester) CompareHeader(t *testing.T, key string, expected string)
- func (a *APITester) CompareStatus(t *testing.T, extected int)
- func (a *APITester) Run(handler func(req *restful.Request, rsp *restful.Response))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APITester ¶
type APITester struct {
// contains filtered or unexported fields
}
APITester helps you testing go-micro APIs
func NewAPITester ¶
NewAPITester creates a new helper that makes your life easier
func (*APITester) Authorize ¶
Authorize sets the given bearer authorization token for the current request
func (*APITester) CompareBody ¶
CompareBody compares the exepcted body with the response body
func (*APITester) CompareHeader ¶
CompareHeader compares the header value of the given key with the response header
func (*APITester) CompareStatus ¶
CompareStatus compares the expected status with the response status
Click to show internal directories.
Click to hide internal directories.