Skip to content

Commit

Permalink
chore: Refactors test checks to only run for TPF due to [] in SDKv2…
Browse files Browse the repository at this point in the history
… for computed specs
  • Loading branch information
EspenAlbert committed Jan 10, 2025
1 parent 19c703f commit 8a2c2aa
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"github.com/stretchr/testify/mock"

"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/config"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/service/advancedcluster"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/service/advancedclustertpf"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/acc"
Expand Down Expand Up @@ -1265,8 +1266,6 @@ func TestAccMockableAdvancedCluster_shardedAddAnalyticsAndAutoScaling(t *testing
"state_name": "IDLE",
"project_id": projectID,
"name": clusterName,
"replication_specs.0.region_configs.0.electable_specs.0.instance_size": "M30",
"replication_specs.0.region_configs.0.analytics_specs.0.node_count": "0",
}
checksUpdatedMap = map[string]string{
"replication_specs.0.region_configs.0.auto_scaling.0.disk_gb_enabled": "true",
Expand All @@ -1280,9 +1279,13 @@ func TestAccMockableAdvancedCluster_shardedAddAnalyticsAndAutoScaling(t *testing
"replication_specs.1.region_configs.0.analytics_specs.0.ebs_volume_type": "PROVISIONED",
"replication_specs.1.region_configs.0.analytics_specs.0.disk_iops": "1000",
}
checks = checkAggr(true, nil, checksMap)
checksUpdated = checkAggr(true, nil, checksUpdatedMap)
)
if config.AdvancedClusterV2Schema() {
checksMap["replication_specs.0.region_configs.0.electable_specs.0.instance_size"] = "M30"
checksMap["replication_specs.0.region_configs.0.analytics_specs.0.node_count"] = "0"
}
checks := checkAggr(true, nil, checksMap)
unit.CaptureOrMockTestCaseAndRun(t, mockConfig, &resource.TestCase{
ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
Steps: []resource.TestStep{
Expand Down

0 comments on commit 8a2c2aa

Please sign in to comment.