Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildFormRequest ¶
func BuildFormRequest(ctx context.Context, tb testing.TB, meth, pth string, v *url.Values) (*httptest.ResponseRecorder, *http.Request)
BuildFormRequest builds an http request and http response recorder for the given form values (expressed as url.Values). It sets the proper headers and response types to post as a form and expect HTML in return.
Types ¶
type ServerConfigResponse ¶
type ServerConfigResponse struct { Config *config.UIServiceConfig Renderer *renderer.Renderer Processor *justification.Processor }
ServerConfigResponse is the response from creating a server config.
func NewServerConfig ¶
func NewServerConfig(tb testing.TB, port string, allowlist []string, devMode bool) *ServerConfigResponse
NewServerConfig creates a new server configuration. It creates all the keys, databases, and cacher, but does not actually start the server. All cleanup is scheduled by t.Cleanup.
Click to show internal directories.
Click to hide internal directories.