Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminAPIResponse ¶
AdminAPIResponse represents an HTTP response from the Kong Admin API
type FakeAdminAPIServer ¶
type FakeAdminAPIServer struct { // Endpoint is the (fake) HTTP server for the Kong Admin API Endpoint *httptest.Server // KongClient is a *kong.Client configured to connect with the Endpoint KongClient *kong.Client // HTTPClient is an *http.Client configured to connect with the Endpoint HTTPClient *http.Client // contains filtered or unexported fields }
FakeAdminAPIServer implements a basic httptest.Server which can be used as a Kong Admin API for unit tests.
func NewFakeAdminAPIServer ¶
func NewFakeAdminAPIServer() (*FakeAdminAPIServer, error)
NewFakeAdminAPIServer provides a new *FakeAdminAPIServer which can be used for unit testing functionality that requires a *kong.Client or otherwise needs to communicate with the Kong Admin API.
func (*FakeAdminAPIServer) MockNextResponse ¶
func (f *FakeAdminAPIServer) MockNextResponse(r AdminAPIResponse)
Click to show internal directories.
Click to hide internal directories.