Documentation
¶
Overview ¶
Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
Index ¶
- func ApplicationPackageDir(t *testing.T, java, cert bool) (string, string)
- type Exec
- type HTTPClient
- func (c *HTTPClient) Consumed() bool
- func (c *HTTPClient) Do(request *http.Request, timeout time.Duration) (*http.Response, error)
- func (c *HTTPClient) NextResponse(response HTTPResponse)
- func (c *HTTPClient) NextResponseBytes(status int, body []byte)
- func (c *HTTPClient) NextResponseError(err error)
- func (c *HTTPClient) NextResponseString(status int, body string)
- func (c *HTTPClient) NextStatus(status int)
- type HTTPResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplicationPackageDir ¶
ApplicationPackageDir creates a mock application package directory using test helper t, returning the path to the "application" directory and the root directory where it was created. If java is true, create a file that indicates this package contains Java code. If cert is true, create an empty certificate file.
Types ¶
type HTTPClient ¶
type HTTPClient struct { // LogRequests enables logging of all requests made through this client. LogRequests bool // LastRequest is the last HTTP request made through this. LastRequest *http.Request // ReadBody controls whether the client consumes the request body automatically. If true, LastBody will contain the // body of the most recent request. ReadBody bool // LastBody is a copy of the last request payload sent through this. LastBody []byte // Requests contains all requests made through this. Requests []*http.Request // contains filtered or unexported fields }
func (*HTTPClient) Consumed ¶
func (c *HTTPClient) Consumed() bool
func (*HTTPClient) NextResponse ¶
func (c *HTTPClient) NextResponse(response HTTPResponse)
func (*HTTPClient) NextResponseBytes ¶
func (c *HTTPClient) NextResponseBytes(status int, body []byte)
func (*HTTPClient) NextResponseError ¶
func (c *HTTPClient) NextResponseError(err error)
func (*HTTPClient) NextResponseString ¶
func (c *HTTPClient) NextResponseString(status int, body string)
func (*HTTPClient) NextStatus ¶
func (c *HTTPClient) NextStatus(status int)
Click to show internal directories.
Click to hide internal directories.