acceptance

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccTest

func AccTest(t *testing.T, tc resource.TestCase)

AccTest wrapper for acceptance tests

func EnvironmentTemplate

func EnvironmentTemplate(t *testing.T, template string, otherVars ...map[string]string) string

EnvironmentTemplate asserts existence and fills in {env.VAR} & {var.RANDOM} placeholders in template

func ResourceCheck

func ResourceCheck(name string,
	cb func(ctx context.Context, client *common.DatabricksClient, id string) error) resource.TestCheckFunc

ResourceCheck calls back a function with client and resource id

func Test

func Test(t *testing.T, steps []Step, otherVars ...map[string]string)

Test wrapper over terraform testing framework

Types

type Step

type Step struct {
	Template string
	Callback func(ctx context.Context, client *common.DatabricksClient, id string) error
	Check    func(*terraform.State) error

	Destroy                   bool
	ExpectNonEmptyPlan        bool
	ExpectError               *regexp.Regexp
	PlanOnly                  bool
	PreventDiskCleanup        bool
	PreventPostDestroyRefresh bool
	ImportState               bool
	ImportStateVerify         bool
}

Step ...

Jump to

Keyboard shortcuts

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