Documentation ¶
Index ¶
- Variables
- func EnsureProvidersAreInitialised()
- func Environment() (*azure.Environment, error)
- func EnvironmentName() string
- func PreCheck(t *testing.T)
- func RequiresImportError(resourceName string) *regexp.Regexp
- type TestData
- func (td TestData) DataSourceTest(t *testing.T, steps []resource.TestStep)
- func (td TestData) ImportStep(ignore ...string) resource.TestStep
- func (td *TestData) RandomIntOfLength(len int) int
- func (td *TestData) RandomStringOfLength(len int) string
- func (td TestData) RequiresImportErrorStep(config string) resource.TestStep
- func (td TestData) ResourceTest(t *testing.T, testResource types.TestResource, steps []resource.TestStep)
- func (t *TestData) UUID() string
Constants ¶
This section is empty.
Variables ¶
View Source
var AzureADProvider *schema.Provider
Functions ¶
func EnsureProvidersAreInitialised ¶
func EnsureProvidersAreInitialised()
func Environment ¶ added in v1.5.0
func Environment() (*azure.Environment, error)
func EnvironmentName ¶ added in v1.5.0
func EnvironmentName() string
func RequiresImportError ¶
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 // Environment is a struct containing Details about the Azure Environment // that we're running against Environment azure.Environment // EnvironmentName is the name of the Azure Environment where we're running EnvironmentName string // MetadataURL is the url of the endpoint where the environment is obtained MetadataURL string // contains filtered or unexported fields }
func BuildTestData ¶
BuildTestData generates some test data for the given resource
func (TestData) DataSourceTest ¶
func (TestData) ImportStep ¶
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 ¶
RandomIntOfLength is a random 8 to 18 digit integer which is unique to this test case
func (*TestData) RandomStringOfLength ¶
RandomStringOfLength is a random 1 to 1024 character string which is unique to this test case
func (TestData) RequiresImportErrorStep ¶
RequiresImportErrorStep returns a Test Step which expects a Requires Import error to be returned when running this step
func (TestData) ResourceTest ¶
Click to show internal directories.
Click to hide internal directories.