Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client extends the regular http.Client by adding a GetContent method that does a GET query to a given URL and returns an error if the status is non-200. This is typically used to retrieve small files stored in a S3 bucket like the maintenance.BasicHTTPMaintenanceTrigger or the version.BasicHTTPVersionGetter are doing.
type ServerMock ¶
ServerMock is a HTTP server whose response can be controlled from the tests. This is used to mock external dependencies like s3 buckets or a remote HTTP server.
func (*ServerMock) ServeHTTP ¶
func (m *ServerMock) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the http.Handler interface.
func (*ServerMock) SetResponse ¶
func (m *ServerMock) SetResponse(t *testing.T, code int, response string)
SetResponse sets the ServerMock's response.
Click to show internal directories.
Click to hide internal directories.