Documentation
¶
Index ¶
- Variables
- func CheckForResourceDestroy(r *http.Response, err error) (bool, error)
- func CheckForResourceDestroyCustomHTTPCode(r *http.Response, err error, customHttpCode int) (bool, error)
- func CheckParentEnvironmentDestroy(ctx context.Context, apiClient *management.APIClient, environmentID string) (bool, error)
- func ComposeCompare(fs ...error) error
- func DeepCloneFlow(src, dst *dv.Flow) error
- func ErrorCheck(t *testing.T) resource.ErrorCheckFunc
- func GetAttributeFromState(s *terraform.State, resourceFullName, attributeName string) (string, error)
- func MainTfHcl(resourceName string) (hcl string)
- func MainTfHclUpdate() string
- func PingOneTestClient(ctx context.Context) (*pingone.Client, error)
- func PingoneEnvironmentServicesSsoHcl(resourceName string, p1Services []string, withBootstrapConfig bool) (hcl string)
- func PingoneEnvironmentSsoHcl(resourceName string, withBootstrapConfig bool) (hcl string)
- func PreCheckClient(t *testing.T)
- func PreCheckDaVinciClient(t *testing.T)
- func PreCheckNewEnvironment(t *testing.T)
- func PreCheckPingOneClient(t *testing.T)
- func RandStringFieldGen() string
- func RandStringWithPrefix(prefix string) string
- func ReadFlowJsonFile(path string) (string, error)
- func ReadFlowJsonFileRaw(path string) (string, error)
- func ResourceNameGen() string
- func TestAccResourceConnectionHcl(resourceName string, p1Services []string, connections []TestConnection) (hcl string)
- func TestClient() (*dv.APIClient, error)
- func TfHclPingOneDavinci() string
- type CompareFunc
- type SchemaAttributeBoolean
- type SchemaAttributeFloat64
- type SchemaAttributeMap
- type SchemaAttributeString
- type TestApplication
- type TestApplicationFlowPolicy
- func (tafp TestApplicationFlowPolicy) GetResourceFullName() (resourceName string)
- func (tafp *TestApplicationFlowPolicy) SetApplicationID(applicationID string)
- func (tafp *TestApplicationFlowPolicy) SetEnvironmentID(environmentID string)
- func (tafp *TestApplicationFlowPolicy) SetID(id string)
- func (tafp *TestApplicationFlowPolicy) SetName(name string)
- type TestConnection
- type TestConnectionProperty
Constants ¶
This section is empty.
Variables ¶
var ExternalProviders map[string]resource.ExternalProvider
ExternalProviders is a map of additional providers that may be used during testing.
var ProtoV6ProviderFactories map[string]func() (tfprotov6.ProviderServer, error) = protoV6ProviderFactoriesInit(context.Background(), "davinci")
var Provider *schema.Provider
Provider is the "main" provider instance
This Provider can be used in testing code for API calls without requiring the use of saving and referencing specific ProviderFactories instances.
PreCheck(t) must be called before using this provider instance.
var ProviderFactories map[string]func() (*schema.Provider, error)
ProviderFactories is a static map containing only the main provider instance
Use other ProviderFactories functions, such as FactoriesAlternate, for tests requiring special provider configurations.
var TestCheckFunc func(*terraform.State) error
TestCheckFunc is used by CheckDestroy to determine for proper resource destruction
Functions ¶
func CheckForResourceDestroy ¶ added in v0.3.0
func CheckForResourceDestroyCustomHTTPCode ¶ added in v0.3.0
func CheckParentEnvironmentDestroy ¶ added in v0.3.0
func ComposeCompare ¶ added in v0.1.3
func DeepCloneFlow ¶ added in v0.3.0
func ErrorCheck ¶
func ErrorCheck(t *testing.T) resource.ErrorCheckFunc
func GetAttributeFromState ¶ added in v0.1.3
func GetAttributeFromState(s *terraform.State, resourceFullName, attributeName string) (string, error)
Can pull top-level attributes from state and return as string
func MainTfHclUpdate ¶
func MainTfHclUpdate() string
func PingOneTestClient ¶ added in v0.3.0
func PingoneEnvironmentServicesSsoHcl ¶ added in v0.3.0
func PingoneEnvironmentServicesSsoHcl(resourceName string, p1Services []string, withBootstrapConfig bool) (hcl string)
PingoneEnvrionmentSsoHcl returns hcl for a pingone environment and assigns roles used for SSO by davinci The following environment vars must be set: - PINGONE_ENVIRONMENT_ID - PINGONE_LICENSE_ID - PINGONE_SSO_USERNAME - PINGONE_SSO_PASSWORD
The `resourceName` input can be a random charset and will be used for the name of each resource and datasource in the returned hcl. p1services is a list of services besides SSO and DaVinci to enable on the environment
func PingoneEnvironmentSsoHcl ¶ added in v0.3.0
PingoneEnvironmentSsoHcl returns hcl for a pingone environment and assigns roles used for SSO by davinci The following environment vars must be set: - PINGONE_ENVIRONMENT_ID - PINGONE_LICENSE_ID - PINGONE_SSO_USERNAME - PINGONE_SSO_PASSWORD
The `resourceName` input can be a random charset and will be used for the name of each resource and datasource in the returned hcl.
func PreCheckClient ¶ added in v0.3.0
func PreCheckDaVinciClient ¶ added in v0.3.0
check required variabes are met for tests
func PreCheckNewEnvironment ¶ added in v0.3.0
func PreCheckPingOneClient ¶ added in v0.3.0
func RandStringFieldGen ¶
func RandStringFieldGen() string
func RandStringWithPrefix ¶
func ReadFlowJsonFile ¶ added in v0.3.0
takes path to json file, adjusts flow name attribute to include unique resource name, and returns json string
func ReadFlowJsonFileRaw ¶ added in v0.4.3
takes path to json file, adjusts flow name attribute to include unique resource name, and returns json string
func ResourceNameGen ¶
func ResourceNameGen() string
func TestAccResourceConnectionHcl ¶ added in v0.1.13
func TestAccResourceConnectionHcl(resourceName string, p1Services []string, connections []TestConnection) (hcl string)
func TestClient ¶ added in v0.1.6
func TfHclPingOneDavinci ¶
func TfHclPingOneDavinci() string
Types ¶
type CompareFunc ¶ added in v0.1.3
type CompareFunc func(interface{}) error
type SchemaAttributeBoolean ¶ added in v0.1.3
func (*SchemaAttributeBoolean) Compare ¶ added in v0.1.3
func (s *SchemaAttributeBoolean) Compare() error
type SchemaAttributeFloat64 ¶ added in v0.1.3
type SchemaAttributeFloat64 struct { AttributeName string ExpectedValue float64 ActualValue float64 }
func (*SchemaAttributeFloat64) Compare ¶ added in v0.1.3
func (s *SchemaAttributeFloat64) Compare() error
type SchemaAttributeMap ¶ added in v0.1.3
type SchemaAttributeMap struct { AttributeName string ExpectedValue map[string]interface{} ActualValue map[string]interface{} }
func (*SchemaAttributeMap) Compare ¶ added in v0.1.3
func (s *SchemaAttributeMap) Compare() error
type SchemaAttributeString ¶ added in v0.1.3
func (*SchemaAttributeString) Compare ¶ added in v0.1.3
func (s *SchemaAttributeString) Compare() error
type TestApplication ¶ added in v0.2.0
type TestApplication struct { ApplicationResourceName string Name string ID string EnvironmentID string }
func (TestApplication) GetResourceFullName ¶ added in v0.2.0
func (ta TestApplication) GetResourceFullName() (resourceName string)
func (*TestApplication) SetEnvironmentID ¶ added in v0.2.0
func (ta *TestApplication) SetEnvironmentID(environmentID string)
func (*TestApplication) SetID ¶ added in v0.2.0
func (ta *TestApplication) SetID(id string)
func (*TestApplication) SetName ¶ added in v0.2.0
func (ta *TestApplication) SetName(name string)
type TestApplicationFlowPolicy ¶ added in v0.2.0
type TestApplicationFlowPolicy struct { FlowPolicyResourceName string Name string EnvironmentID string ApplicationID string ID string }
func (TestApplicationFlowPolicy) GetResourceFullName ¶ added in v0.2.0
func (tafp TestApplicationFlowPolicy) GetResourceFullName() (resourceName string)
func (*TestApplicationFlowPolicy) SetApplicationID ¶ added in v0.2.0
func (tafp *TestApplicationFlowPolicy) SetApplicationID(applicationID string)
func (*TestApplicationFlowPolicy) SetEnvironmentID ¶ added in v0.2.0
func (tafp *TestApplicationFlowPolicy) SetEnvironmentID(environmentID string)
func (*TestApplicationFlowPolicy) SetID ¶ added in v0.2.0
func (tafp *TestApplicationFlowPolicy) SetID(id string)
func (*TestApplicationFlowPolicy) SetName ¶ added in v0.2.0
func (tafp *TestApplicationFlowPolicy) SetName(name string)
type TestConnection ¶ added in v0.1.13
type TestConnection struct { ResourcePrefix string Name string ConnectorId string Properties []TestConnectionProperty }
func (TestConnection) GetResourceName ¶ added in v0.1.13
func (tc TestConnection) GetResourceName() (resourceName string)
Returns resource name for connection that should be used in hcl format: `<ResourceName>_<Name>`
func (TestConnection) MakeConnectionHcl ¶ added in v0.1.13
func (tcp TestConnection) MakeConnectionHcl() (hcl string)