utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// The executable path of the tested program.
	Program string
	// Working directory prepared for the tested program.
	// If empty, a directory named with random suffixes is picked, and created under the platform-dependent default temporary directory.
	// The directory will be removed when the test finishes.
	WorkDir string
	// Command-line arguments passed to the tested program.
	Args []string

	// Where to redirect the stdout/stderr to. For debugging purposes.
	LogFile *os.File
}

Config Settings of the testing program

type T

type T struct {
	*testing.T
	Config *Config
}

T wraps testing.T and the configurations of the testing instance.

func New

func New(t *testing.T, c *Config) *T

New create an instance of T

func (*T) RunTest

func (t *T) RunTest(tests ...func(*T) error) (err error)

RunTest Helper function for setting up a running Gitea server for functional testing and then gracefully terminating it.

Jump to

Keyboard shortcuts

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