acceptance

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 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_DEST_PROJECT_ID_TEST        = os.Getenv("G42_DEST_PROJECT_ID_TEST")
	G42_IMAGE_SHARE_SOURCE_IMAGE_ID = os.Getenv("G42_IMAGE_SHARE_SOURCE_IMAGE_ID")

	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_DLI_AGENCY_FLAG                  = os.Getenv("G42_DLI_AGENCY_FLAG")
	G42_DLI_DS_AUTH_CSS_OBS_PATH         = os.Getenv("G42_DLI_DS_AUTH_CSS_OBS_PATH")
	G42_DLI_DS_AUTH_KAFKA_TRUST_OBS_PATH = os.Getenv("G42_DLI_DS_AUTH_KAFKA_TRUST_OBS_PATH")
	G42_DLI_DS_AUTH_KAFKA_KEY_OBS_PATH   = os.Getenv("G42_DLI_DS_AUTH_KAFKA_KEY_OBS_PATH")
	G42_DLI_DS_AUTH_KRB_CONF_OBS_PATH    = os.Getenv("G42_DLI_DS_AUTH_KRB_CONF_OBS_PATH")
	G42_DLI_DS_AUTH_KRB_TAB_OBS_PATH     = os.Getenv("G42_DLI_DS_AUTH_KRB_TAB_OBS_PATH")

	G42_SMS_SOURCE_SERVER = os.Getenv("G42_SMS_SOURCE_SERVER")

	G42_KMS_ENVIRONMENT = os.Getenv("G42_KMS_ENVIRONMENT")

	G42_ENTERPRISE_MIGRATE_PROJECT_ID_TEST = os.Getenv("G42_ENTERPRISE_MIGRATE_PROJECT_ID_TEST")
	G42_MODELARTS_HAS_SUBSCRIBE_MODEL      = os.Getenv("G42_MODELARTS_HAS_SUBSCRIBE_MODEL")

	G42_CCE_CLUSTER_ID                  = os.Getenv("G42_CCE_CLUSTER_ID")
	G42_CCE_CLUSTER_NAME                = os.Getenv("G42_CCE_CLUSTER_NAME")
	G42_CCE_CLUSTER_ID_ANOTHER          = os.Getenv("G42_CCE_CLUSTER_ID_ANOTHER")
	G42_CCE_CLUSTER_NAME_ANOTHER        = os.Getenv("G42_CCE_CLUSTER_NAME_ANOTHER")
	G42_LTS_STRUCT_CONFIG_TEMPLATE_ID   = os.Getenv("G42_LTS_STRUCT_CONFIG_TEMPLATE_ID")
	G42_LTS_STRUCT_CONFIG_TEMPLATE_NAME = os.Getenv("G42_LTS_STRUCT_CONFIG_TEMPLATE_NAME")
	G42_LTS_ENABLE_FLAG                 = os.Getenv("G42_LTS_ENABLE_FLAG")
)
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 TestAccPreCheckDliAgency added in v1.13.0

func TestAccPreCheckDliAgency(t *testing.T)

lintignore:AT003

func TestAccPreCheckDliDsAuthCss added in v1.13.0

func TestAccPreCheckDliDsAuthCss(t *testing.T)

lintignore:AT003

func TestAccPreCheckDliDsAuthKafka added in v1.13.0

func TestAccPreCheckDliDsAuthKafka(t *testing.T)

lintignore:AT003

func TestAccPreCheckDliDsAuthKrb added in v1.13.0

func TestAccPreCheckDliDsAuthKrb(t *testing.T)

lintignore:AT003

func TestAccPreCheckEpsID

func TestAccPreCheckEpsID(t *testing.T)

lintignore:AT003

func TestAccPreCheckKms added in v1.12.0

func TestAccPreCheckKms(t *testing.T)

lintignore:AT003

func TestAccPreCheckLtsAomAccess added in v1.13.0

func TestAccPreCheckLtsAomAccess(t *testing.T)

lintignore:AT003

func TestAccPreCheckLtsAomAccessUpdate added in v1.13.0

func TestAccPreCheckLtsAomAccessUpdate(t *testing.T)

lintignore:AT003

func TestAccPreCheckLtsEnableFlag added in v1.13.0

func TestAccPreCheckLtsEnableFlag(t *testing.T)

lintignore:AT003

func TestAccPreCheckLtsStructConfigCustom added in v1.13.0

func TestAccPreCheckLtsStructConfigCustom(t *testing.T)

lintignore:AT003

func TestAccPreCheckMigrateEpsID added in v1.12.0

func TestAccPreCheckMigrateEpsID(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 TestAccPreCheckProjectID added in v1.13.0

func TestAccPreCheckProjectID(t *testing.T)

func TestAccPreCheckProjectId added in v1.13.0

func TestAccPreCheckProjectId(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 TestAccPreCheckSourceImage added in v1.13.0

func TestAccPreCheckSourceImage(t *testing.T)

lintignore:AT003

func TestAccPreCheckUserId added in v1.12.0

func TestAccPreCheckUserId(t *testing.T)

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