Documentation ¶
Index ¶
- Variables
- func AssertGetResponse(t *testing.T, requestURI string, statusCode int, expectedBody string) (*http.Response, string)
- func AssertGetResponseBody(t *testing.T, requestURI string, expectedStatusCode int) (*http.Response, string)
- func AssertLoadError(t *testing.T, rawConfig string, configType string, expectedError string)
- func AssertRedirect(t *testing.T, requestURI string, expectedToLocation string, ...) *http.Response
- func InitServer(t *testing.T, rawConfig string, configType string)
- type Defaults
Constants ¶
This section is empty.
Variables ¶
View Source
var Default = Defaults{ AdminPort: 2019, Certifcates: []string{"/caddy.localhost.crt", "/caddy.localhost.key"}, }
Default testing values
Functions ¶
func AssertGetResponse ¶
func AssertGetResponse(t *testing.T, requestURI string, statusCode int, expectedBody string) (*http.Response, string)
AssertGetResponse request a URI and assert the status code and the body contains a string
func AssertGetResponseBody ¶
func AssertGetResponseBody(t *testing.T, requestURI string, expectedStatusCode int) (*http.Response, string)
AssertGetResponseBody request a URI and assert the status code matches
func AssertLoadError ¶
AssertLoadError will load a config and expect an error
Types ¶
Click to show internal directories.
Click to hide internal directories.