tester

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunGoTest

func RunGoTest(configPath string) (int, error)

Types

type PolicyTestCase

type PolicyTestCase struct {
	ErrorExpected bool               `yaml:"errorExpected"`
	Variables     []TestCaseVariable `yaml:"variables"`
}

type T

type T struct{}

func (*T) ImportPath

func (t *T) ImportPath() string

func (*T) MatchString

func (t *T) MatchString(pat, str string) (bool, error)

func (*T) SetPanicOnExit0

func (t *T) SetPanicOnExit0(bool)

func (*T) StartCPUProfile

func (t *T) StartCPUProfile(io.Writer) error

func (*T) StartTestLog

func (t *T) StartTestLog(io.Writer)

func (*T) StopCPUProfile

func (t *T) StopCPUProfile()

func (*T) StopTestLog

func (t *T) StopTestLog() error

func (*T) WriteHeapProfile

func (t *T) WriteHeapProfile(io.Writer) error

func (*T) WriteProfileTo

func (t *T) WriteProfileTo(string, io.Writer, int) error

type TestCaseVariable

type TestCaseVariable struct {
	Key   string      `yaml:"key"`
	Value interface{} `yaml:"value"`
}

type TestConfig

type TestConfig struct {
	Name         string           `yaml:"name"`
	Cases        []PolicyTestCase `yaml:"cases"`
	TerraformDir string           `yaml:"terraformDir"`
	ErrorMessage string           `yaml:"errorMessage"`
	ErrorCode    string           `yaml:"errorCode"`
}

Jump to

Keyboard shortcuts

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