testing

package
v0.36.3 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CDTmpDir

func CDTmpDir(t *testing.T) (string, func())

CDTmpDir changes directory to a temp directory. It returns the path to the temp dir and a function you should defer to change back to your original directory. The tmp dir will be automatically deleted when tests end.

func PrepareWrConfig

func PrepareWrConfig(t *testing.T) (jobqueue.ServerConfig, func())

PrepareWrConfig creates a temp directory, changes to that directory, creates a wr config file with available ports set, then returns a ServerConfig with that configuration. It also returns a function you should defer, which changes directory back.

func Serve

func Serve(t *testing.T, config jobqueue.ServerConfig) *jobqueue.Server

Serve calls jobqueue.Serve() but with a retry for 5s on failure. This allows time for a server that we recently stopped in a prior test to really not be listening on the ports any more.

Types

This section is empty.

Jump to

Keyboard shortcuts

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