tftest

package
v0.10.35 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTerraformProject added in v0.7.19

func CreateTerraformProject(tmpDir string, tfProject TerraformProject) (string, error)

func EnsurePluginsInstalled added in v0.7.3

func EnsurePluginsInstalled()

func GoldenFileHCLResourceTestsWithOpts added in v0.10.7

func GoldenFileHCLResourceTestsWithOpts(t *testing.T, testName string, options *GoldenFileOptions, ctxOptions ...func(ctx *config.RunContext))

func GoldenFileResourceTests added in v0.8.7

func GoldenFileResourceTests(t *testing.T, testName string)

func GoldenFileResourceTestsWithOpts added in v0.9.6

func GoldenFileResourceTestsWithOpts(t *testing.T, testName string, options *GoldenFileOptions, ctxOptions ...func(ctx *config.RunContext))

func GoldenFileUsageSyncTest added in v0.9.11

func GoldenFileUsageSyncTest(t *testing.T, testName string, ctxOptions ...func(ctx *config.RunContext))

func ResourceTests

func ResourceTests(t *testing.T, tf string, usage schema.UsageMap, checks []testutil.ResourceCheck)

func ResourceTestsForTerraformProject added in v0.7.19

func ResourceTestsForTerraformProject(t *testing.T, tfProject TerraformProject, usage schema.UsageMap, checks []testutil.ResourceCheck, ctxOptions ...func(ctx *config.RunContext))

func RunCostCalculations

func RunCostCalculations(runCtx *config.RunContext, projects []*schema.Project) ([]*schema.Project, error)

func RunSyncUsage added in v0.9.11

func RunSyncUsage(t *testing.T, projectCtx *config.ProjectContext, projects []*schema.Project, usageFilePath string) []byte

func WithProviders

func WithProviders(tf string) string

Types

type File

type File struct {
	Path     string
	Contents string
}

type GoldenFileOptions added in v0.9.6

type GoldenFileOptions = struct {
	Currency    string
	CaptureLogs bool
	IgnoreCLI   bool
}

func DefaultGoldenFileOptions added in v0.9.7

func DefaultGoldenFileOptions() *GoldenFileOptions

type TerraformProject added in v0.7.19

type TerraformProject struct {
	Files []File
}

Jump to

Keyboard shortcuts

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