Documentation
¶
Index ¶
- func CreateProfile(name string, content string)
- func ExecuteCommand(cmd string, args ...string) (int, string, string, error)
- func HasBody(t *testing.T, req Request, body string)
- func HasCookie(t *testing.T, req Request, name string, value string)
- func HasHeader(t *testing.T, req Request, name string, value string)
- func HasMethod(t *testing.T, req Request, method string)
- func HasPath(t *testing.T, req Request, expectedPath string)
- func HasQueryParam(t *testing.T, req Request, name string, value string)
- func HasRequestCount(t *testing.T, expectedCount int)
- func KillDaemon()
- func RunHTTP(t *testing.T, args ...string) string
- func WithTempFile(t *testing.T, content string, toWrap func(*os.File))
- func WrapForIntegrationTest(toWrap func(*testing.T)) func(*testing.T)
- func WrapWithKillDamon(toWrap func(*testing.T)) func(*testing.T)
- func WrapWithTestServer(toWrap func(*testing.T)) func(*testing.T)
- type ReplyWith
- type Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateProfile ¶
CreateProfile creates a profile file with the specified content in the current test profile directory
func ExecuteCommand ¶
ExecuteCommand executes an external command and wait for the command to finish executing
func HasQueryParam ¶
HasQueryParam checks if a request has the query parameter with the specified value
func HasRequestCount ¶
HasRequestCount checks if the number of requests executed so far is the expected
func RunHTTP ¶
RunHTTP will run the http CLI with the specified arguments, ensure that it finished correctly and return the output
func WithTempFile ¶
WithTempFile creates a temporary file, write content to it and then call the wrapped function
func WrapForIntegrationTest ¶
WrapForIntegrationTest wraps a testing function with all the required pieces for an integration test
func WrapWithKillDamon ¶
WrapWithKillDamon executes a test after calling KillDaemon