testutils

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: MPL-2.0 Imports: 9 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 ParseID added in v0.3.6

func ParseID(t *testing.T, s string) resource.ID

func ReadFile

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

func SkipIfEnvUnspecified

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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