acceptance

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	G42VB_REGION_NAME                = os.Getenv("G42VB_REGION_NAME")
	G42VB_CUSTOM_REGION_NAME         = os.Getenv("G42VB_CUSTOM_REGION_NAME")
	G42VB_AVAILABILITY_ZONE          = os.Getenv("G42VB_AVAILABILITY_ZONE")
	G42VB_ACCESS_KEY                 = os.Getenv("G42VB_ACCESS_KEY")
	G42VB_SECRET_KEY                 = os.Getenv("G42VB_SECRET_KEY")
	G42VB_USER_ID                    = os.Getenv("G42VB_USER_ID")
	G42VB_PROJECT_ID                 = os.Getenv("G42VB_PROJECT_ID")
	G42VB_DOMAIN_ID                  = os.Getenv("G42VB_DOMAIN_ID")
	G42VB_DOMAIN_NAME                = os.Getenv("G42VB_DOMAIN_NAME")
	G42VB_ENTERPRISE_PROJECT_ID_TEST = os.Getenv("G42VB_ENTERPRISE_PROJECT_ID_TEST")

	G42VB_FLAVOR_ID        = os.Getenv("G42VB_FLAVOR_ID")
	G42VB_FLAVOR_NAME      = os.Getenv("G42VB_FLAVOR_NAME")
	G42VB_IMAGE_ID         = os.Getenv("G42VB_IMAGE_ID")
	G42VB_IMAGE_NAME       = os.Getenv("G42VB_IMAGE_NAME")
	G42VB_VPC_ID           = os.Getenv("G42VB_VPC_ID")
	G42VB_NETWORK_ID       = os.Getenv("G42VB_NETWORK_ID")
	G42VB_SUBNET_ID        = os.Getenv("G42VB_SUBNET_ID")
	G42VB_MAPREDUCE_CUSTOM = os.Getenv("G42VB_MAPREDUCE_CUSTOM")
	G42VB_ADMIN            = os.Getenv("G42VB_ADMIN")

	G42VB_DEPRECATED_ENVIRONMENT = os.Getenv("G42VB_DEPRECATED_ENVIRONMENT")

	G42VB_WAF_ENABLE_FLAG = os.Getenv("G42VB_WAF_ENABLE_FLAG")

	G42VB_DEST_REGION     = os.Getenv("G42VB_DEST_REGION")
	G42VB_DEST_PROJECT_ID = os.Getenv("G42VB_DEST_PROJECT_ID")
	G42VB_CHARGING_MODE   = os.Getenv("G42VB_CHARGING_MODE")
)
View Source
var TestAccProvider *schema.Provider

TestAccProvider is the "main" provider instance

View Source
var TestAccProviderFactories map[string]func() (*schema.Provider, error)

TestAccProviderFactories is a static map containing only the main provider instance

View Source
var TestAccProviders map[string]*schema.Provider

TestAccProviders is a static map containing only the main provider instance.

Deprecated: Terraform Plugin SDK version 2 uses TestCase.ProviderFactories but supports this value in TestCase.Providers for backwards compatibility. In the future Providers: TestAccProviders will be changed to ProviderFactories: TestAccProviderFactories

Functions

func InitDataSourceCheck

func InitDataSourceCheck(sourceName string) *resourceCheck

InitDataSourceCheck build a 'resourceCheck' object. Only used to check datasource attributes.

Parameters:
  resourceName:    The resource name is used to check in the terraform.State.e.g. : g42vbcloud_waf_domain.domain_1.
Return:
  *resourceCheck: resourceCheck object

func InitResourceCheck

func InitResourceCheck(resourceName string, resourceObject interface{}, getResourceFunc ServiceFunc) *resourceCheck

InitResourceCheck build a 'resourceCheck' object. The common test methods are provided in 'resourceCheck'.

Parameters:
  resourceName:    The resource name is used to check in the terraform.State.e.g. : g42vbcloud_waf_domain.domain_1.
  resourceObject:  Resource object, used to check whether the resource exists in G42cloud.
  getResourceFunc: The function used to get the resource object.
Return:
  *resourceCheck: resourceCheck object

func RandomAccResourceName

func RandomAccResourceName() string

func RandomAccResourceNameWithDash

func RandomAccResourceNameWithDash() string

func RandomCidr

func RandomCidr() string

func RandomCidrAndGatewayIp

func RandomCidrAndGatewayIp() (string, string)

func TestAccPreCheck

func TestAccPreCheck(t *testing.T)

lintignore:AT003

func TestAccPreCheckAdminOnly

func TestAccPreCheckAdminOnly(t *testing.T)

lintignore:AT003

func TestAccPreCheckBms

func TestAccPreCheckBms(t *testing.T)

lintignore:AT003

func TestAccPreCheckChargingMode

func TestAccPreCheckChargingMode(t *testing.T)

lintignore:AT003

func TestAccPreCheckDeprecated

func TestAccPreCheckDeprecated(t *testing.T)

lintignore:AT003

func TestAccPreCheckEpsID

func TestAccPreCheckEpsID(t *testing.T)

lintignore:AT003

func TestAccPreCheckMrsCustom

func TestAccPreCheckMrsCustom(t *testing.T)

lintignore:AT003

func TestAccPreCheckOBS

func TestAccPreCheckOBS(t *testing.T)

lintignore:AT003

func TestAccPreCheckProject

func TestAccPreCheckProject(t *testing.T)

lintignore:AT003

func TestAccPreCheckReplication

func TestAccPreCheckReplication(t *testing.T)

lintignore:AT003

func TestAccPrecheckCustomRegion

func TestAccPrecheckCustomRegion(t *testing.T)

lintignore:AT003

func TestAccPrecheckWafInstance

func TestAccPrecheckWafInstance(t *testing.T)

lintignore:AT003

func TestCheckResourceAttrWithVariable

func TestCheckResourceAttrWithVariable(resourceName, key, varStr string) resource.TestCheckFunc

TestCheckResourceAttrWithVariable validates the variable in state for the given name/key combination.

Parameters:
  resourceName: The resource name is used to check in the terraform.State.
  key:          The field name of the resource.
  variable:     The variable name of the value to be checked.

  variable such like ${g42vbcloud_waf_certificate.certificate_1.id}
  or ${data.g42vbcloud_waf_policies.policies_2.policies.0.id}

Types

type ServiceFunc

type ServiceFunc func(*config.Config, *terraform.ResourceState) (interface{}, error)

ServiceFunc the G42cloud resource query functions.

Jump to

Keyboard shortcuts

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