acc

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MPL-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Provider name for single configuration testing
	ProviderNameMongoDBAtlas = "mongodbatlas"
)

Variables

View Source
var (
	ClusterTagsMap1 = map[string]string{
		"key":   "key 1",
		"value": "value 1",
	}

	ClusterTagsMap2 = map[string]string{
		"key":   "key 2",
		"value": "value 2",
	}

	ClusterTagsMap3 = map[string]string{
		"key":   "key 3",
		"value": "value 3",
	}
)
View Source
var TestAccProviderSdkV2 *schema.Provider

TestAccProviderSdkV2 is only being used in tests obtaining client: .Meta().(*MongoDBClient) this provider instance has to be passed into mux server factory for its configure method to be invoked

View Source
var TestAccProviderV6Factories map[string]func() (tfprotov6.ProviderServer, error)
View Source
var TestMongoDBClient any

TestMongoDBClient is used to configure client required for Framework-based acceptance tests

Functions

func CheckClusterDestroy

func CheckClusterDestroy(s *terraform.State) error

func CheckDatabaseUserAttributes

func CheckDatabaseUserAttributes(dbUser *admin.CloudDatabaseUser, username string) resource.TestCheckFunc

func CheckDatabaseUserExists

func CheckDatabaseUserExists(resourceName string, dbUser *admin.CloudDatabaseUser) resource.TestCheckFunc

func CheckDestroyDatabaseUser

func CheckDestroyDatabaseUser(s *terraform.State) error

func CheckDestroyFederatedDatabaseInstance

func CheckDestroyFederatedDatabaseInstance(s *terraform.State) error

func CheckDestroyLDAPConfiguration

func CheckDestroyLDAPConfiguration(s *terraform.State) error

func CheckDestroyNetworkPeering

func CheckDestroyNetworkPeering(s *terraform.State) error

func CheckDestroyOrgInvitation

func CheckDestroyOrgInvitation(s *terraform.State) error

func CheckDestroyProject

func CheckDestroyProject(s *terraform.State) error

func CheckDestroyProjectIPAccessList

func CheckDestroyProjectIPAccessList(s *terraform.State) error

func CheckDestroySearchIndex

func CheckDestroySearchIndex(state *terraform.State) error

func CheckDestroyStreamInstance

func CheckDestroyStreamInstance(state *terraform.State) error

func CheckDestroyTeam

func CheckDestroyTeam(s *terraform.State) error

func CheckDestroyTeamAdvancedCluster

func CheckDestroyTeamAdvancedCluster(s *terraform.State) error

func CheckProjectAttributes

func CheckProjectAttributes(project *admin.Group, projectName string) resource.TestCheckFunc

func CheckProjectExists

func CheckProjectExists(resourceName string, project *admin.Group) resource.TestCheckFunc

func CheckProjectIPAccessListExists

func CheckProjectIPAccessListExists(resourceName string) resource.TestCheckFunc

func ConfigClusterGlobal

func ConfigClusterGlobal(resourceName, orgID, projectName, name, backupEnabled string) string

func ConfigDatabaseUserBasic

func ConfigDatabaseUserBasic(projectName, orgID, roleName, username, keyLabel, valueLabel string) string

func ConfigDatabaseUserWithAWSIAMType

func ConfigDatabaseUserWithAWSIAMType(projectName, orgID, roleName, username, keyLabel, valueLabel string) string

func ConfigDatabaseUserWithLDAPAuthType

func ConfigDatabaseUserWithLDAPAuthType(projectName, orgID, roleName, username, keyLabel, valueLabel string) string

func ConfigDatabaseUserWithLabels

func ConfigDatabaseUserWithLabels(projectName, orgID, roleName, username string, labels []admin.ComponentLabel) string

func ConfigDatabaseUserWithRoles

func ConfigDatabaseUserWithRoles(username, password, projectName, orgID string, rolesArr []*admin.DatabaseUserRole) string

func ConfigDatabaseUserWithScopes

func ConfigDatabaseUserWithScopes(username, password, projectName, orgID, roleName, clusterName string, scopesArr []*admin.UserScope) string

func ConfigDatabaseUserWithX509Type

func ConfigDatabaseUserWithX509Type(projectName, orgID, roleName, username, keyLabel, valueLabel, x509Type string) string

func ConfigProject

func ConfigProject(projectName, orgID string, teams []*admin.TeamRole) string

func ConfigProjectGovWithOwner

func ConfigProjectGovWithOwner(projectName, orgID, projectOwnerID string) string

func ConfigProjectIPAccessListWithAWSSecurityGroup

func ConfigProjectIPAccessListWithAWSSecurityGroup(projectID, providerName, vpcID, awsAccountID, vpcCIDRBlock, awsRegion, awsSGroup, comment string) string

func ConfigProjectIPAccessListWithCIDRBlock

func ConfigProjectIPAccessListWithCIDRBlock(orgID, projectName, cidrBlock, comment string) string

func ConfigProjectIPAccessListWithIPAddress

func ConfigProjectIPAccessListWithIPAddress(orgID, projectName, ipAddress, comment string) string

func ConfigProjectIPAccessListWithMultiple

func ConfigProjectIPAccessListWithMultiple(projectName, orgID string, accessList []map[string]string, isUpdate bool) string

func ConfigProjectWithFalseDefaultAdvSettings

func ConfigProjectWithFalseDefaultAdvSettings(projectName, orgID, projectOwnerID string) string

func ConfigProjectWithFalseDefaultSettings

func ConfigProjectWithFalseDefaultSettings(projectName, orgID, projectOwnerID string) string

func ConfigProjectWithLimits

func ConfigProjectWithLimits(projectName, orgID string, limits []*admin.DataFederationLimit) string

func ConfigProjectWithOwner

func ConfigProjectWithOwner(projectName, orgID, projectOwnerID string) string

func ConfigProjectWithUpdatedRole

func ConfigProjectWithUpdatedRole(projectName, orgID, teamID, roleName string) string

func ConfigServerlessInstanceBasic

func ConfigServerlessInstanceBasic(orgID, projectName, name string, ignoreConnectionStrings bool) string

func ConfigServerlessInstanceWithTags

func ConfigServerlessInstanceWithTags(orgID, projectName, name string, tags []matlas.Tag) string

func DebugPlan

func DebugPlan() plancheck.PlanCheck

func GetProjectTeamsIdsWithPos

func GetProjectTeamsIdsWithPos(pos int) string

func ImportStateClusterIDFunc

func ImportStateClusterIDFunc(resourceName string) resource.ImportStateIdFunc

func ImportStateProjecIPAccessListtIDFunc

func ImportStateProjecIPAccessListtIDFunc(resourceName string) resource.ImportStateIdFunc

func ImportStateProjectIDFunc

func ImportStateProjectIDFunc(resourceName string) resource.ImportStateIdFunc

func IntGreatThan

func IntGreatThan(value int) resource.CheckResourceAttrWithFunc

func JSONEquals

func JSONEquals[T any](value T) resource.CheckResourceAttrWithFunc

func MatchesExpression

func MatchesExpression(expr string) resource.CheckResourceAttrWithFunc

func PreCheck

func PreCheck(tb testing.TB)

func PreCheckAtlasUsername

func PreCheckAtlasUsername(tb testing.TB)

func PreCheckAwsEnv

func PreCheckAwsEnv(tb testing.TB)

func PreCheckBasic

func PreCheckBasic(tb testing.TB)

func PreCheckBasicOwnerID

func PreCheckBasicOwnerID(tb testing.TB)

func PreCheckBetaFlag

func PreCheckBetaFlag(tb testing.TB)

func PreCheckCloudProviderAccessAzure

func PreCheckCloudProviderAccessAzure(tb testing.TB)

func PreCheckDataLakePipelineRun

func PreCheckDataLakePipelineRun(tb testing.TB)

func PreCheckDataLakePipelineRuns

func PreCheckDataLakePipelineRuns(tb testing.TB)

func PreCheckEncryptionAtRestEnvAzure

func PreCheckEncryptionAtRestEnvAzure(tb testing.TB)

func PreCheckFederatedSettings

func PreCheckFederatedSettings(tb testing.TB)

func PreCheckGPCEnv

func PreCheckGPCEnv(tb testing.TB)

func PreCheckGov

func PreCheckGov(tb testing.TB)

func PreCheckLDAP

func PreCheckLDAP(tb testing.TB)

func PreCheckPeeringEnvAWS

func PreCheckPeeringEnvAWS(tb testing.TB)

func PreCheckPeeringEnvAzure

func PreCheckPeeringEnvAzure(tb testing.TB)

func PreCheckPeeringEnvGCP

func PreCheckPeeringEnvGCP(tb testing.TB)

func PreCheckPrivateEndpointServiceDataFederationOnlineArchiveRun

func PreCheckPrivateEndpointServiceDataFederationOnlineArchiveRun(tb testing.TB)

func PreCheckProjectTeamsIdsWithMinCount

func PreCheckProjectTeamsIdsWithMinCount(tb testing.TB, minTeamsCount int)

func PreCheckRegularCredsAreEmpty

func PreCheckRegularCredsAreEmpty(tb testing.TB)

func PreCheckSTSAssumeRole

func PreCheckSTSAssumeRole(tb testing.TB)

func SkipIfTFAccNotDefined

func SkipIfTFAccNotDefined(tb testing.TB)

SkipIfTFAccNotDefined is added to acceptance tests were you do not want any preparation code executed if the resulting steps will not run. Keep in mind that if TF_ACC is empty, go still runs acceptance tests but terraform-plugin-testing does not execute the resulting steps.

func SkipTest

func SkipTest(tb testing.TB)

func SkipTestExtCred

func SkipTestExtCred(tb testing.TB)

func SkipTestForCI

func SkipTestForCI(tb testing.TB)

SkipTestForCI is added to tests that cannot run as part of a CI

func StreamInstanceConfig

func StreamInstanceConfig(orgID, projectName, instanceName, region, cloudProvider string) string

Types

type ClusterInfo

type ClusterInfo struct {
	ProjectIDStr        string
	ClusterName         string
	ClusterNameStr      string
	ClusterTerraformStr string
}

func GetClusterInfo

func GetClusterInfo(orgID string) ClusterInfo

GetClusterInfo is used to obtain a project and cluster configuration resource. When `MONGODB_ATLAS_CLUSTER_NAME` and `MONGODB_ATLAS_PROJECT_ID` are defined, creation of resources is avoided. This is useful for local execution but not intended for CI executions.

Jump to

Keyboard shortcuts

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