asserts

package
v2.2.6 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 7 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 Expect404WithNoRouteFunc added in v2.2.0

func Expect404WithNoRouteFunc(t *testing.T, ctx context.Context, url string) func() bool

Expect404WithNoRouteFunc is used to check whether a given URL responds with 404 and a standard Kong no route message.

func Never

func Never(
	t *testing.T,
	conditionFunc func(ctx context.Context) bool,
	waitTime,
	tickTime time.Duration,
	msgAndArgs ...any,
)

Never asserts that the provided conditionFunc never returns true within the specified waitTime, checking the condition every tickTime. If the conditionFunc returns true at any point, the test fails with the provided message and arguments. The conditionFunc receives a context.Context which is derived from the testing.T context, allowing for cancellation and timeouts. The conditionFunc is run immediately upon entering the function, in the same goroutine as the caller, thus it's a blocking call.

Types

This section is empty.

Jump to

Keyboard shortcuts

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