acceptance

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AzureADProvider *schema.Provider

Functions

func EnsureProvidersAreInitialised

func EnsureProvidersAreInitialised()

func PreCheck

func PreCheck(t *testing.T)

func RequiresImportError

func RequiresImportError(resourceName string) *regexp.Regexp

Types

type TestData

type TestData struct {
	// RandomInteger is a random integer which unique to this test case
	RandomInteger int

	// RandomString is a random 5 character string unique to this test case
	RandomString string

	// RandomID is a random UUID unique to this test case
	RandomID string

	// RandomPassword is a random password unique to this test case
	// This is not securely generated and only suitable for ephemeral test cases
	RandomPassword string

	// ResourceName is the fully qualified resource name, comprising of the
	// resource type and then the resource label
	// e.g. `azuread_application.test`
	ResourceName string

	// ResourceType is the Terraform Resource Type - `azuread_application`
	ResourceType string
	// contains filtered or unexported fields
}

func BuildTestData

func BuildTestData(t *testing.T, resourceType string, resourceLabel string) TestData

BuildTestData generates some test data for the given resource

func (TestData) DataSourceTest

func (td TestData) DataSourceTest(t *testing.T, steps []resource.TestStep)

func (TestData) ImportStep

func (td TestData) ImportStep(ignore ...string) resource.TestStep

ImportStep returns a Test Step which Imports the Resource, optionally ignoring any fields which may not be imported (for example, as they're not returned from the API)

func (*TestData) RandomIntOfLength

func (td *TestData) RandomIntOfLength(len int) int

RandomIntOfLength is a random 8 to 18 digit integer which is unique to this test case

func (*TestData) RandomStringOfLength

func (td *TestData) RandomStringOfLength(len int) string

RandomStringOfLength is a random 1 to 1024 character string which is unique to this test case

func (TestData) RequiresImportErrorStep

func (td TestData) RequiresImportErrorStep(config string) resource.TestStep

RequiresImportErrorStep returns a Test Step which expects a Requires Import error to be returned when running this step

func (TestData) ResourceTest

func (td TestData) ResourceTest(t *testing.T, testResource types.TestResource, steps []resource.TestStep)

func (TestData) ResourceTestIgnoreDangling

func (td TestData) ResourceTestIgnoreDangling(t *testing.T, _ types.TestResource, steps []resource.TestStep)

func (*TestData) UUID

func (t *TestData) UUID() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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