Documentation
¶
Overview ¶
Package pulumitest provides helper functions to facilitate testing of Pulumi resources and outputs. This package utilizes testify to offer assertions and comparisons tailored to Pulumi's constructs.
Usage:
In your tests, import this package and use its provided functions to compare expected and actual Pulumi resources or outputs. The functions in this package abstract away the repetitive tasks and boilerplate, allowing you to focus on writing meaningful tests for your Pulumi programs.
Index ¶
- func AssertArrayEqual(t *testing.T, expected, actual pulumi.ArrayOutput, msgAndArgs ...interface{})
- func AssertMapEqual(t *testing.T, expected, actual pulumi.MapOutput, msgAndArgs ...interface{})
- func AssertResourceEqual(t *testing.T, expected, actual interface{}, fields []string, ...)
- func AssertStringMapEqual(t *testing.T, expected, actual pulumi.StringMapOutput, ...)
- func AssertStringOutputEqual(t *testing.T, expected, actual pulumi.Output, msgAndArgs ...interface{})
- func SetPulumiConfig(t *testing.T, config map[string]string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertArrayEqual ¶
func AssertArrayEqual(t *testing.T, expected, actual pulumi.ArrayOutput, msgAndArgs ...interface{})
func AssertMapEqual ¶
func AssertResourceEqual ¶
func AssertResourceEqual(t *testing.T, expected, actual interface{}, fields []string, msgAndArgs ...interface{})
AssertResourceEqual compares two Pulumi resources and reports any differences using testify. It handles Pulumi specific types like pulumi.Output by delegating to specific assert functions. Other fields are compared using standard testify assert methods.
func AssertStringMapEqual ¶
func AssertStringMapEqual(t *testing.T, expected, actual pulumi.StringMapOutput, msgAndArgs ...interface{})
func AssertStringOutputEqual ¶
Types ¶
This section is empty.