package htesting

import "github.com/gohugoio/hugo/htesting"

Index

Functions

func BailOut

func BailOut(after time.Duration)

BailOut panics with a stack trace after the given duration. Useful for hanging tests.

func CreateTempDir

func CreateTempDir(fs afero.Fs, prefix string) (string, func(), error)

CreateTempDir creates a temp dir in the given filesystem and returns the dirnam and a func that removes it when done.

func NewTestdataBuilder

func NewTestdataBuilder(fs afero.Fs, workingDir string, t testing.TB) *testdataBuilder

func RandIntn

func RandIntn(n int) int

Source Files

test_helpers.go testdata_builder.go

Directories

PathSynopsis
htesting/hqt
Version
v0.64.0
Published
Feb 4, 2020
Platform
linux/amd64
Imports
7 packages
Last checked
3 hours ago

Tools for package owners.