@@ -25,14 +25,7 @@ func TestMigAdvancedCluster_singleAWSProvider(t *testing.T) {
25
25
{
26
26
ExternalProviders : mig .ExternalProviders (),
27
27
Config : config ,
28
- Check : resource .ComposeTestCheckFunc (
29
- checkExists (resourceName ),
30
- resource .TestCheckResourceAttrSet (resourceName , "project_id" ),
31
- resource .TestCheckResourceAttr (resourceName , "name" , clusterName ),
32
- resource .TestCheckResourceAttr (resourceName , "retain_backups_enabled" , "true" ),
33
- resource .TestCheckResourceAttrSet (resourceName , "replication_specs.#" ),
34
- resource .TestCheckResourceAttrSet (resourceName , "replication_specs.0.region_configs.#" ),
35
- ),
28
+ Check : checkSingleProvider (projectID , clusterName ),
36
29
},
37
30
mig .TestStepCheckEmptyPlan (config ),
38
31
},
@@ -54,14 +47,7 @@ func TestMigAdvancedCluster_multiCloud(t *testing.T) {
54
47
{
55
48
ExternalProviders : mig .ExternalProviders (),
56
49
Config : config ,
57
- Check : resource .ComposeTestCheckFunc (
58
- checkExists (resourceName ),
59
- resource .TestCheckResourceAttrSet (resourceName , "project_id" ),
60
- resource .TestCheckResourceAttr (resourceName , "name" , clusterName ),
61
- resource .TestCheckResourceAttr (resourceName , "retain_backups_enabled" , "false" ),
62
- resource .TestCheckResourceAttrSet (resourceName , "replication_specs.#" ),
63
- resource .TestCheckResourceAttrSet (resourceName , "replication_specs.0.region_configs.#" ),
64
- ),
50
+ Check : checkMultiCloud (clusterName , 3 ),
65
51
},
66
52
mig .TestStepCheckEmptyPlan (config ),
67
53
},
@@ -110,7 +96,7 @@ func TestMigAdvancedCluster_partialAdvancedConf(t *testing.T) {
110
96
{
111
97
ExternalProviders : mig .ExternalProviders (),
112
98
Config : config ,
113
- Check : resource .ComposeTestCheckFunc (
99
+ Check : resource .ComposeAggregateTestCheckFunc (
114
100
checkExists (resourceName ),
115
101
resource .TestCheckResourceAttr (resourceName , "advanced_configuration.0.fail_index_key_too_long" , "false" ),
116
102
resource .TestCheckResourceAttr (resourceName , "advanced_configuration.0.javascript_enabled" , "true" ),
@@ -123,7 +109,7 @@ func TestMigAdvancedCluster_partialAdvancedConf(t *testing.T) {
123
109
{
124
110
ProtoV6ProviderFactories : acc .TestAccProviderV6Factories ,
125
111
Config : configUpdated ,
126
- Check : resource .ComposeTestCheckFunc (
112
+ Check : resource .ComposeAggregateTestCheckFunc (
127
113
checkExists (resourceName ),
128
114
resource .TestCheckResourceAttr (resourceName , "advanced_configuration.0.fail_index_key_too_long" , "false" ),
129
115
resource .TestCheckResourceAttr (resourceName , "advanced_configuration.0.javascript_enabled" , "true" ),
0 commit comments