package
0.15.1
Repository: https://github.com/cisco-open/go-lanai.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

AddDefaultRequestOptions returns a TestServerOptions that add default RequestOptions on every request created via NewRequest.
ContentType returns a RequestOptions that set content type in header.
Cookies returns a RequestOptions that carry on cookies from given response.
CurrentContextPath utility func that extract current server context-path from testing context Return DefaultContextPath if not found.
CurrentPort utility func that extract current server port from testing context Return -1 if not found.
Exec execute given request depending on test server mode (real vs mocked) returned ExecResult is guaranteed to have non-nil ExecResult.Response if there is no error.
No description provided by the author
Headers returns a RequestOptions that set additional headers.
MustExec is same as Exec, but panic instead of returning error Note: don't forget to close the response's body when done with it.
No description provided by the author
No description provided by the author
NewRequest create a new *http.Request based on current execution mode.
Queries returns a RequestOptions that set additional queries.
UseContextPath returns a TestServerOptions that overwrite the context-path of the test server.
UseLogLevel returns a TestServerOptions that overwrite the default log level of the test server.
UsePort returns a TestServerOptions that use given port.
WithMockedServer initialize web package without starting an actual web server.
WithRealServer start a real web server at random port with context-path as DefaultContextPath.
WithUtilities DOES NOT initialize web package, it only provide properties and setup utilities (e.g.

# Constants

No description provided by the author

# Structs

No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author