# README
testutils
Functions
func EnsureBlockFileEqualsGoldenFile
func EnsureBlockFileEqualsGoldenFile(block *hclwrite.Block, goldenFile string) error
EnsureBlockFileEqualsGoldenFile checks that provided hclwrite.Block
content is equals to the content of
the provided golden file.
func EnsureFileContentEquals
func EnsureFileContentEquals(file *hclwrite.File, expected string) error
EnsureFileContentEquals checks that provided hclwrite.File
content is equals to the expected string.
func EnsureFileEqualsGoldenFile
func EnsureFileEqualsGoldenFile(file *hclwrite.File, goldenFile string) error
EnsureFileEqualsGoldenFile checks that provided hclwrite.File
content is equals to the content of
the provided golden file.
func ExpectPanic
func ExpectPanic(t *testing.T, tcname string, callback func(), expectedError string)
ExpectPanic executes provided 'fn' function and check that:
panic(...)
has been called- related error is the expected one.
func LoadGoldenFile
func LoadGoldenFile(filename string) (*string, error)
LoadGoldenFile loads the golden file filename located under 'testdata' directory
It takes care of suffixing the filename with ".golden.tf".
Types
type ExpectedMismatchError
type ExpectedMismatchError struct { ... }
ExpectedMismatchError is an error wrapping expected and actual value when they don't match.
func (ExpectedMismatchError) Error
func (e ExpectedMismatchError) Error() string
Error is a basic implementation of error
interface, it returns a formatted error message.
Readme created from Go doc with goreadme