test

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertNotifyLeaksNoSecret

func AssertNotifyLeaksNoSecret(ctx context.Context, t *testing.T, 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

func CreateTmpl(t *testing.T) *template.Template

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

func RetryTests(retryCodes []int) map[int]bool

RetryTests returns a map of HTTP status codes to bool indicating whether the notifier should retry or not.

Types

This section is empty.

Jump to

Keyboard shortcuts

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