testutils

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestAccProvider *schema.Provider
View Source
var TestAccProviders map[string]*schema.Provider

Functions

func CheckStateSetAttr

func CheckStateSetAttr(attrKey string, resource string, expectedItems []string) resource.TestCheckFunc

Elements of lists and sets are stored in terraform state as independent variables with the sufix "_{index}". To check the value, we need to get the length of the list and iterate over it and get the list elements one by one and compare them with the values from the current test plan.

func Provider

func Provider() map[string]*schema.Provider

func RunGetCreateStatementTest added in v1.3.0

func RunGetCreateStatementTest(t *testing.T, resourceType string, testCases []TestCase)

func TestAccPreCheck

func TestAccPreCheck(t *testing.T)

Types

type TestCase added in v1.3.0

type TestCase struct {
	EnvVars     map[string]string
	ExpectedSQL string
}

Jump to

Keyboard shortcuts

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