testutil

package
v0.58.6 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertCheckCode

func AssertCheckCode(t *testing.T, includeCode string, excludeCode string, results []result.Result, messages ...string)

func CreateModulesFromSource added in v0.58.2

func CreateModulesFromSource(source string, ext string, t *testing.T) []block.Module

func CreateTestFile

func CreateTestFile(filename, contents string) string

func CreateTestFileWithModule

func CreateTestFileWithModule(contents string, moduleContents string) string

func ScanHCL

func ScanHCL(source string, t *testing.T, additionalOptions ...scanner.Option) []result.Result

func ScanJSON

func ScanJSON(source string, t *testing.T) []result.Result

Types

type FileSystem added in v0.58.2

type FileSystem struct {
	// contains filtered or unexported fields
}

func NewFilesystem added in v0.58.2

func NewFilesystem() (*FileSystem, error)

func (*FileSystem) AddDir added in v0.58.2

func (fs *FileSystem) AddDir(path string) error

func (*FileSystem) Close added in v0.58.2

func (fs *FileSystem) Close() error

func (*FileSystem) RealPath added in v0.58.2

func (fs *FileSystem) RealPath(path string) string

func (*FileSystem) WriteFile added in v0.58.2

func (fs *FileSystem) WriteFile(path string, data []byte) error

func (*FileSystem) WriteTextFile added in v0.58.2

func (fs *FileSystem) WriteTextFile(path string, text string) error

Jump to

Keyboard shortcuts

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