Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Refactors mongodbatlas_private_endpoint_regional_mode to use cluster info #2403

Merged
Prev Previous commit
Next Next commit
test: enable test in CI and fix duplicate zone name
  • Loading branch information
EspenAlbert committed Jul 11, 2024
commit 358ebfa4370b44dba3443cd9345512202f279561
Original file line number Diff line number Diff line change
@@ -18,8 +18,6 @@ func TestAccPrivateEndpointRegionalMode_basic(t *testing.T) {
}

func TestAccPrivateEndpointRegionalMode_conn(t *testing.T) {
acc.SkipTestForCI(t) // needs AWS configuration

var (
endpointResourceSuffix = "atlasple"
resourceSuffix = "atlasrm"
@@ -30,8 +28,8 @@ func TestAccPrivateEndpointRegionalMode_conn(t *testing.T) {
region = os.Getenv("AWS_REGION")
privatelinkEndpointServiceResourceName = fmt.Sprintf("mongodbatlas_privatelink_endpoint_service.%s", endpointResourceSuffix)
clusterDependsOn = fmt.Sprintf("%s, %s", resourceName, privatelinkEndpointServiceResourceName)
spec1 = acc.ReplicationSpec(&acc.ReplicationSpecRequest{Region: "US_EAST_1", ProviderName: providerName})
spec2 = acc.ReplicationSpec(&acc.ReplicationSpecRequest{Region: "US_WEST_2", ProviderName: providerName})
spec1 = acc.ReplicationSpec(&acc.ReplicationSpecRequest{Region: "US_EAST_1", ProviderName: providerName, ZoneName: "Zone 1"})
spec2 = acc.ReplicationSpec(&acc.ReplicationSpecRequest{Region: "US_WEST_2", ProviderName: providerName, ZoneName: "Zone 2"})
clusterInfo = acc.GetClusterInfo(t, &acc.ClusterRequest{Geosharded: true, DiskSizeGb: 80, ResourceDependencyName: clusterDependsOn}, spec1, spec2)
clusterName = clusterInfo.ClusterName
projectID = clusterInfo.ProjectID