acceptance

package
v1.10.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	G42_REGION_NAME                = os.Getenv("G42_REGION_NAME")
	G42_CUSTOM_REGION_NAME         = os.Getenv("G42_CUSTOM_REGION_NAME")
	G42_AVAILABILITY_ZONE          = os.Getenv("G42_AVAILABILITY_ZONE")
	G42_ACCESS_KEY                 = os.Getenv("G42_ACCESS_KEY")
	G42_SECRET_KEY                 = os.Getenv("G42_SECRET_KEY")
	G42_USER_ID                    = os.Getenv("G42_USER_ID")
	G42_PROJECT_ID                 = os.Getenv("G42_PROJECT_ID")
	G42_DOMAIN_ID                  = os.Getenv("G42_DOMAIN_ID")
	G42_ACCOUNT_NAME               = os.Getenv("G42_ACCOUNT_NAME")
	G42_USERNAME                   = os.Getenv("G42_USERNAME")
	G42_ENTERPRISE_PROJECT_ID_TEST = os.Getenv("G42_ENTERPRISE_PROJECT_ID_TEST")
	G42_SWR_SHARING_ACCOUNT        = os.Getenv("G42_SWR_SHARING_ACCOUNT")

	G42_FLAVOR_ID        = os.Getenv("G42_FLAVOR_ID")
	G42_FLAVOR_NAME      = os.Getenv("G42_FLAVOR_NAME")
	G42_IMAGE_ID         = os.Getenv("G42_IMAGE_ID")
	G42_IMAGE_NAME       = os.Getenv("G42_IMAGE_NAME")
	G42_VPC_ID           = os.Getenv("G42_VPC_ID")
	G42_NETWORK_ID       = os.Getenv("G42_NETWORK_ID")
	G42_SUBNET_ID        = os.Getenv("G42_SUBNET_ID")
	G42_MAPREDUCE_CUSTOM = os.Getenv("G42_MAPREDUCE_CUSTOM")
	G42_ADMIN            = os.Getenv("G42_ADMIN")

	G42_DEPRECATED_ENVIRONMENT = os.Getenv("G42_DEPRECATED_ENVIRONMENT")

	G42_WAF_ENABLE_FLAG = os.Getenv("G42_WAF_ENABLE_FLAG")

	G42_DEST_REGION     = os.Getenv("G42_DEST_REGION")
	G42_DEST_PROJECT_ID = os.Getenv("G42_DEST_PROJECT_ID")
	G42_CHARGING_MODE   = os.Getenv("G42_CHARGING_MODE")

	G42_GITHUB_REPO_PWD       = os.Getenv("G42_GITHUB_REPO_PWD")
	G42_GITHUB_REPO_HOST      = os.Getenv("G42_GITHUB_REPO_HOST")
	G42_GITHUB_PERSONAL_TOKEN = os.Getenv("G42_GITHUB_PERSONAL_TOKEN")
	G42_GITHUB_REPO_URL       = os.Getenv("G42_GITHUB_REPO_URL")
	G42_OBS_STORAGE_URL       = os.Getenv("G42_OBS_STORAGE_URL")
	G42_BUILD_IMAGE_URL       = os.Getenv("G42_BUILD_IMAGE_URL")

	G42_DC_DIRECT_CONNECT_ID = os.Getenv("G42_DC_DIRECT_CONNECT_ID")

	G42_SMS_SOURCE_SERVER = os.Getenv("G42_SMS_SOURCE_SERVER")
)
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. : g42cloud_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. : g42cloud_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 RandomPassword added in v1.8.0

func RandomPassword() 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 TestAccPreCheckComponent added in v1.5.0

func TestAccPreCheckComponent(t *testing.T)

lintignore:AT003

func TestAccPreCheckComponentDeployment added in v1.5.0

func TestAccPreCheckComponentDeployment(t *testing.T)

lintignore:AT003

func TestAccPreCheckDcDirectConnection added in v1.8.0

func TestAccPreCheckDcDirectConnection(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 TestAccPreCheckRepoPwdAuth added in v1.5.0

func TestAccPreCheckRepoPwdAuth(t *testing.T)

lintignore:AT003

func TestAccPreCheckRepoTokenAuth added in v1.5.0

func TestAccPreCheckRepoTokenAuth(t *testing.T)

lintignore:AT003

func TestAccPreCheckSWRDomian added in v1.4.0

func TestAccPreCheckSWRDomian(t *testing.T)

lintignore:AT003

func TestAccPreCheckSms added in v1.9.0

func TestAccPreCheckSms(t *testing.T)

lintignore:AT003

func TestAccPrecheckCustomRegion

func TestAccPrecheckCustomRegion(t *testing.T)

lintignore:AT003

func TestAccPrecheckDomainId added in v1.10.0

func TestAccPrecheckDomainId(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 ${g42cloud_waf_certificate.certificate_1.id}
  or ${data.g42cloud_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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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