test

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package test contains utilities used in the policy engine's test suite.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeTempFS added in v0.5.7

func MakeTempFS(files map[string]string) (rootDir string, cleanup func(), err error)

MakeTempFS creates a temporary directory structure for test purposes. If the creation fails, cleanup is nil and the caller does not have to invoke it. If creation succeeds, the caller should invoke cleanup when they are done.

func Subtest

func Subtest(t *testing.T, name string, f func(*testing.T))

Subtest executes a sub-test f under test t.

func WithTempFS added in v0.5.7

func WithTempFS(files map[string]string, f func(string))

WithTempFS creates a temporary directory structure and invokes f with the root directory path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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