testutils

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package testutils contains utility functions for unit and integration tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDirOrDie

func CreateDirOrDie(t *testing.T, path ...string) string

CreateDirOrDie creates a directory at the given path.

This function returns the path to the created directory. This function panics on error.

func CreateFileOrDie

func CreateFileOrDie(t *testing.T, path []string, text string) string

CreateFileOrDie creates a file with the given text.

This function returns the path to the created file. This function panics on error.

func CreateTempDirOrDie

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

CreateTempDirOrDie creates a temporary directory.

This function returns the path to the created directory and a cleanup function that should be deferred by the caller. This function panics on error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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