Documentation
¶
Index ¶
- Variables
- func CheckAuthConfig(property, value string, testState *TestState) resource.TestCheckFunc
- func CheckAuthMethod(expected auth.AuthenticationMethod, testState *TestState) resource.TestCheckFunc
- func CopyMap(src map[string]any) map[string]any
- func DataSourceFQN(providerName, typeName, dataSourceName string) string
- func DebugPlan() plancheck.PlanCheck
- func FunctionHeader(providerName, functionName string) string
- func GetFixturesDirPath(fixtureDir ...string) string
- func GetTestAccProtoV6ProviderFactories() map[string]func() (tfprotov6.ProviderServer, error)
- func GetTestUnitProtoV6ProviderFactories(fabricClientOpts *azcore.ClientOptions, testState *TestState) map[string]func() (tfprotov6.ProviderServer, error)
- func IsWellKnownDataAvailable() bool
- func RandomName(length ...int) string
- func RandomP12Cert(password string) []byte
- func RandomP12CertB64(password string) string
- func RandomURI() string
- func RandomUUID() string
- func RefByFQN(objectFQN, path string) string
- func ResourceFQN(providerName, typeName, resourceName string) string
- func ShouldSkipTest(t *testing.T) bool
- func TestAccPreCheck(t *testing.T)
- func TestAccPreCheckNoEnvs(t *testing.T)
- func TestAccWorkspaceResource(t *testing.T, capacityID string) (resourceHCL, resourceFQN string)
- func TestUnitPreCheck(t *testing.T)
- func TestUnitPreCheckNoEnvs(t *testing.T)
- func TypeName(providerName, typeName string) string
- func WellKnown() map[string]any
- type TestState
Constants ¶
This section is empty.
Variables ¶
var NewTestAccCase = func(t *testing.T, testResource *string, preCheck func(*testing.T), steps []resource.TestStep) resource.TestCase { t.Helper() if preCheck == nil { return newTestAccCase(t, testResource, TestAccPreCheck, steps) } return newTestAccCase(t, testResource, preCheck, steps) }
var NewTestUnitCase = func(t *testing.T, testResource *string, fakeServer *fabfake.ServerFactory, preCheck func(*testing.T), steps []resource.TestStep) resource.TestCase { t.Helper() if preCheck == nil { return newTestUnitCase(t, testResource, fakeServer, nil, TestUnitPreCheck, steps) } return newTestUnitCase(t, testResource, fakeServer, nil, preCheck, steps) }
var NewTestUnitCaseWithState = func(t *testing.T, testResource *string, fakeServer *fabfake.ServerFactory, testState *TestState, preCheck func(*testing.T), steps []resource.TestStep) resource.TestCase { t.Helper() if preCheck == nil { return newTestUnitCase(t, testResource, fakeServer, testState, TestUnitPreCheck, steps) } return newTestUnitCase(t, testResource, fakeServer, testState, preCheck, steps) }
Functions ¶
func CheckAuthConfig ¶
func CheckAuthConfig(property, value string, testState *TestState) resource.TestCheckFunc
func CheckAuthMethod ¶
func CheckAuthMethod(expected auth.AuthenticationMethod, testState *TestState) resource.TestCheckFunc
func DataSourceFQN ¶
Helper function to create a data source FQN.
func FunctionHeader ¶
Helper function to create a function Header.
func GetFixturesDirPath ¶
func GetTestAccProtoV6ProviderFactories ¶
func GetTestAccProtoV6ProviderFactories() map[string]func() (tfprotov6.ProviderServer, error)
getTestAccProtoV6ProviderFactories are used to instantiate a provider during acceptance testing. The factory function will be invoked for every Terraform CLI command executed to create a provider server to which the CLI can reattach.
func GetTestUnitProtoV6ProviderFactories ¶
func GetTestUnitProtoV6ProviderFactories(fabricClientOpts *azcore.ClientOptions, testState *TestState) map[string]func() (tfprotov6.ProviderServer, error)
getTestUnitProtoV6ProviderFactories are used to instantiate a provider during unit testing. The factory function will be invoked for every Terraform CLI command executed to create a provider server to which the CLI can reattach.
func IsWellKnownDataAvailable ¶
func IsWellKnownDataAvailable() bool
func RandomName ¶
func RandomP12Cert ¶
func RandomP12CertB64 ¶
func RandomUUID ¶
func RandomUUID() string
func ResourceFQN ¶
Helper function to create a resource FQN.
func ShouldSkipTest ¶
ShouldSkipTest checks if a test should be skipped based on FABRIC_TESTACC_SKIP_NO_SPN environment variable.
func TestAccWorkspaceResource ¶
lintignore:AT003
func TestUnitPreCheck ¶
func TestUnitPreCheckNoEnvs ¶
Types ¶
type TestState ¶
type TestState struct {
Config *pconfig.ProviderConfig
}
func NewTestState ¶
func NewTestState() *TestState