assert

package
v0.37.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequireStatusCodeOption

type RequireStatusCodeOption func(*requireStatusCodeConfig)

func WithRequireStatusCodeHTTPClient

func WithRequireStatusCodeHTTPClient(httpClient *http.Client) RequireStatusCodeOption

func WithRequireStatusCodePollInterval

func WithRequireStatusCodePollInterval(pollInterval time.Duration) RequireStatusCodeOption

func WithRequireStatusCodeWaitFor

func WithRequireStatusCodeWaitFor(waitFor time.Duration) RequireStatusCodeOption

type ResponseBody

type ResponseBody = string

func RequireEventuallyStatusCode

func RequireEventuallyStatusCode(
	t *testing.T, expectedStatusCode int, r *http.Request, opts ...RequireStatusCodeOption,
) ResponseBody

RequireEventuallyStatusCode is a helper function that retries a request until the expected status code is returned.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL