A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pkg.go.dev/github.com/hashicorp/terraform-plugin-testing/config below:

config package - github.com/hashicorp/terraform-plugin-testing/config - Go Packages

Package config implements functionality for supporting native Terraform configuration and variables for testing purposes.

This section is empty.

This section is empty.

func BoolVariable(value bool) boolVariable

BoolVariable returns boolVariable which implements Variable.

func FloatVariable[T anyFloat](value T) floatVariable

FloatVariable returns floatVariable which implements Variable.

func IntegerVariable[T anyInteger](value T) integerVariable

IntegerVariable returns integerVariable which implements Variable.

func ListVariable(value ...Variable) listVariable

ListVariable returns listVariable which implements Variable.

MapVariable returns mapVariable which implements Variable.

ObjectVariable returns objectVariable which implements Variable.

func SetVariable(value ...Variable) setVariable

SetVariable returns setVariable which implements Variable.

StaticDirectory returns the supplied directory.

StaticFile returns the supplied file.

func StringVariable(value string) stringVariable

StringVariable returns stringVariable which implements Variable.

TestNameDirectory returns the name of the test prefixed with "testdata".

For example, given test code:

func TestExampleCloudThing_basic(t *testing.T) {
    resource.Test(t, resource.TestCase{
        Steps: []resource.TestStep{
            {
                ConfigDirectory: config.TestNameDirectory(),
            },
        },
    })
}

The testing configurations will be expected in the testdata/TestExampleCloudThing_basic/ directory.

TestNameFile returns the name of the test suffixed with the supplied file and prefixed with "testdata".

For example, given test code:

func TestExampleCloudThing_basic(t *testing.T) {
    resource.Test(t, resource.TestCase{
        Steps: []resource.TestStep{
            {
                ConfigFile: config.TestNameFile("test.tf"),
            },
        },
    })
}

The testing configuration will be expected in the testdata/TestExampleCloudThing_basic/test.tf file.

TestStepDirectory returns the name of the test suffixed with the test step number and prefixed with "testdata".

For example, given test code:

func TestExampleCloudThing_basic(t *testing.T) {
    resource.Test(t, resource.TestCase{
        Steps: []resource.TestStep{
            {
                ConfigDirectory: config.TestStepDirectory(),
            },
        },
    })
}

The testing configurations will be expected in the testdata/TestExampleCloudThing_basic/1 directory as TestStepConfigRequest.StepNumber is one-based.

TestStepFile returns the name of the test suffixed with the test step number and the supplied file, and prefixed with "testdata".

For example, given test code:

func TestExampleCloudThing_basic(t *testing.T) {
    resource.Test(t, resource.TestCase{
        Steps: []resource.TestStep{
            {
                ConfigFile: config.TestStepFile("test.tf"),
            },
        },
    })
}

The testing configuration will be expected in the testdata/TestExampleCloudThing_basic/1/test.tf file as TestStepConfigRequest.StepNumber is one-based.

func TupleVariable(value ...Variable) tupleVariable

TupleVariable returns tupleVariable which implements Variable.

TestStepConfigFunc is the callback type used with acceptance tests to specify a string which either identifies a directory containing Terraform configuration files, or a file that contains Terraform configuration.

Exec executes TestStepConfigFunc if it is not nil, otherwise an empty string is returned.

Variable interface is an alias to json.Marshaler.

Variables is a type holding a key-value map of variable names to types implementing the Variable interface.

Write creates a file in the destination supplied containing JSON encoded Variables.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4