Skip to content

Commit b7fcc28

Browse files
committed
tests for disk_iops
1 parent 646dae2 commit b7fcc28

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

internal/service/advancedcluster/resource_advanced_cluster_test.go

+10-2
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,9 @@ func checkSingleProvider(projectID, name string) resource.TestCheckFunc {
675675
"name": name},
676676
resource.TestCheckResourceAttr(resourceName, "retain_backups_enabled", "true"),
677677
resource.TestCheckResourceAttrWith(resourceName, "replication_specs.0.region_configs.0.electable_specs.0.disk_iops", acc.IntGreatThan(0)),
678-
resource.TestCheckResourceAttrWith(dataSourceName, "replication_specs.0.region_configs.0.electable_specs.0.disk_iops", acc.IntGreatThan(0)))
678+
resource.TestCheckResourceAttrWith(resourceName, "replication_specs.0.region_configs.0.analytics_specs.0.disk_iops", acc.IntGreatThan(0)),
679+
resource.TestCheckResourceAttrWith(dataSourceName, "replication_specs.0.region_configs.0.electable_specs.0.disk_iops", acc.IntGreatThan(0)),
680+
resource.TestCheckResourceAttrWith(dataSourceName, "replication_specs.0.region_configs.0.analytics_specs.0.disk_iops", acc.IntGreatThan(0)))
679681
}
680682

681683
func configIncorrectTypeGobalClusterSelfManagedSharding(projectID, name string) string {
@@ -830,7 +832,13 @@ func checkMultiCloudSharded(name string) resource.TestCheckFunc {
830832
return checkAggr(
831833
[]string{"project_id", "replication_specs.#", "replication_specs.0.region_configs.#"},
832834
map[string]string{
833-
"name": name})
835+
"name": name},
836+
resource.TestCheckResourceAttrWith(resourceName, "replication_specs.0.region_configs.0.electable_specs.0.disk_iops", acc.IntGreatThan(0)),
837+
resource.TestCheckResourceAttrWith(resourceName, "replication_specs.0.region_configs.0.analytics_specs.0.disk_iops", acc.IntGreatThan(0)),
838+
resource.TestCheckResourceAttrWith(resourceName, "replication_specs.0.region_configs.1.electable_specs.0.disk_iops", acc.IntGreatThan(0)),
839+
resource.TestCheckResourceAttrWith(dataSourceName, "replication_specs.0.region_configs.0.electable_specs.0.disk_iops", acc.IntGreatThan(0)),
840+
resource.TestCheckResourceAttrWith(dataSourceName, "replication_specs.0.region_configs.0.analytics_specs.0.disk_iops", acc.IntGreatThan(0)),
841+
resource.TestCheckResourceAttrWith(dataSourceName, "replication_specs.0.region_configs.1.electable_specs.0.disk_iops", acc.IntGreatThan(0)))
834842
}
835843

836844
func configSingleProviderPaused(projectID, clusterName string, paused bool, instanceSize string) string {

0 commit comments

Comments
 (0)