testutils

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package testutils provides test helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertRedirect

func AssertRedirect(t *testing.T, w *httptest.ResponseRecorder, path string)

func AttrMap

func AttrMap(node *html.Node) map[string]string

func NewRenderer added in v0.1.14

func NewRenderer(t *testing.T) otfhtml.Renderer

func NewSecret

func NewSecret(t *testing.T) []byte

NewSecret produces a cryptographically random 16-byte key, intended for use with aes-128 in tests.

func ReadFile

func ReadFile(t *testing.T, path string) []byte

func SkipIfEnvUnspecified

func SkipIfEnvUnspecified(t *testing.T, env string)

func Wait added in v0.2.0

func Wait[T any](t *testing.T, c <-chan pubsub.Event[T], cond func(pubsub.Event[T]) bool)

Wait for an event to arrive satisfying the condition within a 10 second timeout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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