@@ -54,9 +54,9 @@ func TestAccClusterAdvancedCluster_basicTenant(t *testing.T) {
54
54
}
55
55
56
56
func TestAccClusterAdvancedCluster_replicaSetAWSProvider (t * testing.T ) {
57
- resource .ParallelTest (t , replicaSetAWSProviderTestCase (t , true ))
57
+ resource .ParallelTest (t , replicaSetAWSProviderTestCase (t ))
58
58
}
59
- func replicaSetAWSProviderTestCase (t * testing.T , checkNewAttributes bool ) resource.TestCase {
59
+ func replicaSetAWSProviderTestCase (t * testing.T ) resource.TestCase {
60
60
t .Helper ()
61
61
var (
62
62
projectID = acc .ProjectIDExecution (t )
@@ -70,11 +70,11 @@ func replicaSetAWSProviderTestCase(t *testing.T, checkNewAttributes bool) resour
70
70
Steps : []resource.TestStep {
71
71
{
72
72
Config : configReplicaSetAWSProvider (projectID , clusterName , 60 , 3 ),
73
- Check : checkReplicaSetAWSProvider (projectID , clusterName , 60 , 3 , checkNewAttributes , checkNewAttributes ),
73
+ Check : checkReplicaSetAWSProvider (projectID , clusterName , 60 , 3 , true , true ),
74
74
},
75
75
{
76
76
Config : configReplicaSetAWSProvider (projectID , clusterName , 50 , 5 ),
77
- Check : checkReplicaSetAWSProvider (projectID , clusterName , 50 , 5 , checkNewAttributes , checkNewAttributes ),
77
+ Check : checkReplicaSetAWSProvider (projectID , clusterName , 50 , 5 , true , true ),
78
78
},
79
79
{
80
80
ResourceName : resourceName ,
@@ -88,9 +88,9 @@ func replicaSetAWSProviderTestCase(t *testing.T, checkNewAttributes bool) resour
88
88
}
89
89
90
90
func TestAccClusterAdvancedCluster_replicaSetMultiCloud (t * testing.T ) {
91
- resource .ParallelTest (t , replicaSetMultiCloudTestCase (t , true ))
91
+ resource .ParallelTest (t , replicaSetMultiCloudTestCase (t ))
92
92
}
93
- func replicaSetMultiCloudTestCase (t * testing.T , verifyExternalID bool ) resource.TestCase {
93
+ func replicaSetMultiCloudTestCase (t * testing.T ) resource.TestCase {
94
94
t .Helper ()
95
95
var (
96
96
orgID = os .Getenv ("MONGODB_ATLAS_ORG_ID" )
@@ -106,11 +106,11 @@ func replicaSetMultiCloudTestCase(t *testing.T, verifyExternalID bool) resource.
106
106
Steps : []resource.TestStep {
107
107
{
108
108
Config : configReplicaSetMultiCloud (orgID , projectName , clusterName ),
109
- Check : checkReplicaSetMultiCloud (clusterName , 3 , verifyExternalID ),
109
+ Check : checkReplicaSetMultiCloud (clusterName , 3 ),
110
110
},
111
111
{
112
112
Config : configReplicaSetMultiCloud (orgID , projectName , clusterNameUpdated ),
113
- Check : checkReplicaSetMultiCloud (clusterNameUpdated , 3 , verifyExternalID ),
113
+ Check : checkReplicaSetMultiCloud (clusterNameUpdated , 3 ),
114
114
},
115
115
{
116
116
ResourceName : resourceName ,
@@ -124,10 +124,10 @@ func replicaSetMultiCloudTestCase(t *testing.T, verifyExternalID bool) resource.
124
124
}
125
125
126
126
func TestAccClusterAdvancedCluster_singleShardedMultiCloud (t * testing.T ) {
127
- resource .ParallelTest (t , singleShardedMultiCloudTestCase (t , true ))
127
+ resource .ParallelTest (t , singleShardedMultiCloudTestCase (t ))
128
128
}
129
129
130
- func singleShardedMultiCloudTestCase (t * testing.T , verifyExternalID bool ) resource.TestCase {
130
+ func singleShardedMultiCloudTestCase (t * testing.T ) resource.TestCase {
131
131
t .Helper ()
132
132
var (
133
133
orgID = os .Getenv ("MONGODB_ATLAS_ORG_ID" )
@@ -143,11 +143,11 @@ func singleShardedMultiCloudTestCase(t *testing.T, verifyExternalID bool) resour
143
143
Steps : []resource.TestStep {
144
144
{
145
145
Config : configShardedOldSchemaMultiCloud (orgID , projectName , clusterName , 1 , "M10" ),
146
- Check : checkShardedOldSchemaMultiCloud (clusterName , 1 , "M10" , verifyExternalID ),
146
+ Check : checkShardedOldSchemaMultiCloud (clusterName , 1 , "M10" , true ),
147
147
},
148
148
{
149
149
Config : configShardedOldSchemaMultiCloud (orgID , projectName , clusterNameUpdated , 1 , "M10" ),
150
- Check : checkShardedOldSchemaMultiCloud (clusterNameUpdated , 1 , "M10" , verifyExternalID ),
150
+ Check : checkShardedOldSchemaMultiCloud (clusterNameUpdated , 1 , "M10" , true ),
151
151
},
152
152
{
153
153
ResourceName : resourceName ,
@@ -535,10 +535,10 @@ func TestAccClusterAdvancedClusterConfig_symmetricShardedOldSchema(t *testing.T)
535
535
}
536
536
537
537
func TestAccClusterAdvancedClusterConfig_symmetricGeoShardedOldSchema (t * testing.T ) {
538
- resource .ParallelTest (t , symmetricGeoShardedOldSchemaTestCase (t , true ))
538
+ resource .ParallelTest (t , symmetricGeoShardedOldSchemaTestCase (t ))
539
539
}
540
540
541
- func symmetricGeoShardedOldSchemaTestCase (t * testing.T , checkNewAttributes bool ) resource.TestCase {
541
+ func symmetricGeoShardedOldSchemaTestCase (t * testing.T ) resource.TestCase {
542
542
t .Helper ()
543
543
var (
544
544
orgID = os .Getenv ("MONGODB_ATLAS_ORG_ID" )
@@ -553,11 +553,11 @@ func symmetricGeoShardedOldSchemaTestCase(t *testing.T, checkNewAttributes bool)
553
553
Steps : []resource.TestStep {
554
554
{
555
555
Config : configGeoShardedOldSchema (orgID , projectName , clusterName , 2 , 2 , false ),
556
- Check : checkGeoShardedOldSchema (clusterName , 2 , 2 , checkNewAttributes , false ),
556
+ Check : checkGeoShardedOldSchema (clusterName , 2 , 2 , true , false ),
557
557
},
558
558
{
559
559
Config : configGeoShardedOldSchema (orgID , projectName , clusterName , 3 , 3 , false ),
560
- Check : checkGeoShardedOldSchema (clusterName , 3 , 3 , checkNewAttributes , false ),
560
+ Check : checkGeoShardedOldSchema (clusterName , 3 , 3 , true , false ),
561
561
},
562
562
},
563
563
}
@@ -1012,7 +1012,7 @@ func configReplicaSetMultiCloud(orgID, projectName, name string) string {
1012
1012
` , orgID , projectName , name )
1013
1013
}
1014
1014
1015
- func checkReplicaSetMultiCloud (name string , regionConfigs int , verifyExternalID bool ) resource.TestCheckFunc {
1015
+ func checkReplicaSetMultiCloud (name string , regionConfigs int ) resource.TestCheckFunc {
1016
1016
additionalChecks := []resource.TestCheckFunc {
1017
1017
resource .TestCheckResourceAttr (resourceName , "retain_backups_enabled" , "false" ),
1018
1018
resource .TestCheckResourceAttrWith (resourceName , "replication_specs.0.region_configs.#" , acc .JSONEquals (strconv .Itoa (regionConfigs ))),
@@ -1021,9 +1021,7 @@ func checkReplicaSetMultiCloud(name string, regionConfigs int, verifyExternalID
1021
1021
resource .TestCheckResourceAttrSet (dataSourcePluralName , "results.#" ),
1022
1022
resource .TestCheckResourceAttrSet (dataSourcePluralName , "results.0.replication_specs.#" ),
1023
1023
resource .TestCheckResourceAttrSet (dataSourcePluralName , "results.0.name" ),
1024
- }
1025
- if verifyExternalID {
1026
- additionalChecks = append (additionalChecks , resource .TestCheckResourceAttrSet (resourceName , "replication_specs.0.external_id" ))
1024
+ resource .TestCheckResourceAttrSet (resourceName , "replication_specs.0.external_id" ),
1027
1025
}
1028
1026
return checkAggr (
1029
1027
[]string {"project_id" , "replication_specs.#" , "replication_specs.0.id" },
0 commit comments