Documentation ¶
Index ¶
- Constants
- Variables
- func GetTestProviderFactories(provider *schema.Provider) map[string]func() (*schema.Provider, error)
- func MetaDataSourceAttributeCheck(dataSourceName, resourceName string) []resource.TestCheckFunc
- func MetaResourceAttributeCheck(resourceName string) []resource.TestCheckFunc
- func Parse(m interface{}, objects string) (string, error)
- func TestPreCheck(t *testing.T) func()
- type AcceptanceTestType
- type TestAcceptanceConfig
- type TestAcceptanceOption
- func WithClusterName(name string) TestAcceptanceOption
- func WithDataSourceScript() TestAcceptanceOption
- func WithEKSCluster() TestAcceptanceOption
- func WithKubeConfig() TestAcceptanceOption
- func WithKubeConfigImageRegistry() TestAcceptanceOption
- func WithKubeConfigProxy() TestAcceptanceOption
- func WithTKGmAWSCluster() TestAcceptanceOption
- func WithTKGmVsphereCluster() TestAcceptanceOption
- func WithTKGsCluster() TestAcceptanceOption
Constants ¶
View Source
const ( ClusterResource = "tanzu-mission-control_cluster" ClusterResourceVar = "test_attach_cluster" ClusterDataSourceVar = "test_data_attach_cluster" // EKS Constants. EksClusterResource = "tanzu-mission-control_ekscluster" EksClusterGroup = "tanzu-mission-control_cluster_group" EksClusterResourceVar = "test_create_eks_cluster" EksClusterGroupVar = "test_create_eks_cluster_group" )
View Source
const (
MetaTemplate = `meta {
description = "resource with description"
labels = {
"key1" : "value1"
"key2" : "value2"
}
}`
)
Variables ¶
View Source
var ( ClusterResourceName = fmt.Sprintf("%s.%s", ClusterResource, ClusterResourceVar) ClusterDataSourceName = fmt.Sprintf("data.%s.%s", ClusterResource, ClusterDataSourceVar) EksClusterResourceName = fmt.Sprintf("%s.%s", EksClusterResource, EksClusterResourceVar) EksClusterGroupName = fmt.Sprintf("data.%s.%s", EksClusterGroup, EksClusterGroupVar) )
Functions ¶
func MetaDataSourceAttributeCheck ¶
func MetaDataSourceAttributeCheck(dataSourceName, resourceName string) []resource.TestCheckFunc
func MetaResourceAttributeCheck ¶
func MetaResourceAttributeCheck(resourceName string) []resource.TestCheckFunc
func TestPreCheck ¶
Types ¶
type AcceptanceTestType ¶ added in v1.1.4
type AcceptanceTestType int
const ( AttachClusterType AcceptanceTestType = iota AttachClusterTypeWithKubeConfig AttachClusterTypeWithKubeconfigImageRegistry AttachClusterTypeWithKubeconfigProxy TkgAWSCluster TkgsCluster TkgVsphereCluster CreateEksCluster )
type TestAcceptanceConfig ¶ added in v1.1.4
type TestAcceptanceConfig struct { ResourceName string ResourceNameVar string DataSourceNameVar string Name string KubeConfigPath string Meta string AccTestType AcceptanceTestType TemplateData string ManagementClusterName string ProvisionerName string Version string StorageClass string ControlPlaneEndPoint string // EKS KubernetesVersion string Region string AWSAccountNumber string CloudFormationTemplateID string CredentialName string OrgID string ClusterGroupName string ImageRegistry string Proxy string }
func TestGetDefaultAcceptanceConfig ¶ added in v1.1.4
func TestGetDefaultAcceptanceConfig() *TestAcceptanceConfig
func TestGetDefaultEksAcceptanceConfig ¶ added in v1.1.4
func TestGetDefaultEksAcceptanceConfig() *TestAcceptanceConfig
type TestAcceptanceOption ¶ added in v1.1.4
type TestAcceptanceOption func(config *TestAcceptanceConfig)
func WithClusterName ¶ added in v1.1.4
func WithClusterName(name string) TestAcceptanceOption
func WithDataSourceScript ¶ added in v1.1.4
func WithDataSourceScript() TestAcceptanceOption
func WithEKSCluster ¶ added in v1.1.4
func WithEKSCluster() TestAcceptanceOption
func WithKubeConfig ¶ added in v1.1.4
func WithKubeConfig() TestAcceptanceOption
func WithKubeConfigImageRegistry ¶ added in v1.2.1
func WithKubeConfigImageRegistry() TestAcceptanceOption
func WithKubeConfigProxy ¶ added in v1.2.1
func WithKubeConfigProxy() TestAcceptanceOption
func WithTKGmAWSCluster ¶ added in v1.1.4
func WithTKGmAWSCluster() TestAcceptanceOption
func WithTKGmVsphereCluster ¶ added in v1.1.4
func WithTKGmVsphereCluster() TestAcceptanceOption
func WithTKGsCluster ¶ added in v1.1.4
func WithTKGsCluster() TestAcceptanceOption
Click to show internal directories.
Click to hide internal directories.