Documentation ¶
Index ¶
- func AssertNotifyLeaksNoSecret(t *testing.T, ctx context.Context, n notify.Notifier, secret ...string)
- func CreateTmpl(t *testing.T) *template.Template
- func DefaultRetryCodes() []int
- func GetContextWithCancelingURL(h ...func(w http.ResponseWriter, r *http.Request)) (context.Context, *url.URL, func())
- func RetryTests(retryCodes []int) map[int]bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertNotifyLeaksNoSecret ¶
func AssertNotifyLeaksNoSecret(t *testing.T, ctx context.Context, n notify.Notifier, secret ...string)
AssertNotifyLeaksNoSecret calls the Notify() method of the notifier, expects it to fail because the context is canceled by the server and checks that no secret data is leaked in the error message returned by Notify().
func CreateTmpl ¶
CreateTmpl returns a ready-to-use template.
func DefaultRetryCodes ¶
func DefaultRetryCodes() []int
DefaultRetryCodes returns the list of HTTP status codes that need to be retried.
func GetContextWithCancelingURL ¶
func GetContextWithCancelingURL(h ...func(w http.ResponseWriter, r *http.Request)) (context.Context, *url.URL, func())
GetContextWithCancelingURL returns a context that gets canceled when a client does a GET request to the returned URL. Handlers passed to the function will be invoked in order before the context gets canceled. The last argument is a function that needs to be called before the caller returns.
func RetryTests ¶
RetryTests returns a map of HTTP status codes to bool indicating whether the notifier should retry or not.
Types ¶
This section is empty.