Skip to content

Commit c499ba9

Browse files
authored
test: Tenant clusters with disk_size_gb is always 5 now (#3057)
* disk size always 5 for shared * fix unit test
1 parent ced602f commit c499ba9

File tree

2 files changed

+4
-29
lines changed

2 files changed

+4
-29
lines changed

internal/service/cluster/resource_cluster_test.go

+3-28
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ func TestAccCluster_withAutoScalingAWS(t *testing.T) {
10231023
func TestAccCluster_tenant(t *testing.T) {
10241024
var (
10251025
resourceName = "mongodbatlas_cluster.tenant"
1026-
projectID, clusterName = acc.ProjectIDExecutionWithCluster(t, 3)
1026+
projectID, clusterName = acc.ProjectIDExecutionWithCluster(t, 1)
10271027
)
10281028

10291029
resource.ParallelTest(t, resource.TestCase{
@@ -1032,12 +1032,12 @@ func TestAccCluster_tenant(t *testing.T) {
10321032
CheckDestroy: acc.CheckDestroyCluster,
10331033
Steps: []resource.TestStep{
10341034
{
1035-
Config: configTenant(projectID, clusterName, "M2", "2"),
1035+
Config: configTenant(projectID, clusterName, "M5", "5"),
10361036
Check: resource.ComposeAggregateTestCheckFunc(
10371037
acc.CheckExistsCluster(resourceName),
10381038
resource.TestCheckResourceAttrSet(resourceName, "project_id"),
10391039
resource.TestCheckResourceAttr(resourceName, "name", clusterName),
1040-
resource.TestCheckResourceAttr(resourceName, "disk_size_gb", "2"),
1040+
resource.TestCheckResourceAttr(resourceName, "disk_size_gb", "5"),
10411041
resource.TestCheckResourceAttrSet(resourceName, "mongo_uri"),
10421042
),
10431043
},
@@ -1055,31 +1055,6 @@ func TestAccCluster_tenant(t *testing.T) {
10551055
})
10561056
}
10571057

1058-
func TestAccCluster_tenant_m5(t *testing.T) {
1059-
var (
1060-
resourceName = "mongodbatlas_cluster.tenant"
1061-
projectID, clusterName = acc.ProjectIDExecutionWithCluster(t, 1)
1062-
)
1063-
1064-
resource.ParallelTest(t, resource.TestCase{
1065-
PreCheck: func() { acc.PreCheckBasic(t) },
1066-
ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
1067-
CheckDestroy: acc.CheckDestroyCluster,
1068-
Steps: []resource.TestStep{
1069-
{
1070-
Config: configTenant(projectID, clusterName, "M5", "5"),
1071-
Check: resource.ComposeAggregateTestCheckFunc(
1072-
acc.CheckExistsCluster(resourceName),
1073-
resource.TestCheckResourceAttrSet(resourceName, "project_id"),
1074-
resource.TestCheckResourceAttr(resourceName, "name", clusterName),
1075-
resource.TestCheckResourceAttr(resourceName, "disk_size_gb", "5"),
1076-
resource.TestCheckResourceAttrSet(resourceName, "mongo_uri"),
1077-
),
1078-
},
1079-
},
1080-
})
1081-
}
1082-
10831058
func TestAccCluster_basicGCPRegionNameWesternUS(t *testing.T) {
10841059
var (
10851060
projectID, clusterName = acc.ProjectIDExecutionWithCluster(t, 3)

internal/testutil/unit/http_mocker_api_paths_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
func TestApiPathsParsing(t *testing.T) {
1212
specParts := unit.ReadAPISpecPaths()
13-
assert.Len(t, specParts, 5)
13+
assert.GreaterOrEqual(t, len(specParts), 5)
1414
assert.Contains(t, specParts, "GET")
1515
processArgsPath := "/api/atlas/v2/groups/6746ceed6f62fc3c122a3e0e/clusters/test-acc-tf-c-7871793563057636102/processArgs"
1616
getPaths := specParts["GET"]

0 commit comments

Comments
 (0)