Skip to content

test: Tenant clusters with disk_size_gb is always 5 now #3057

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 3 additions & 28 deletions internal/service/cluster/resource_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ func TestAccCluster_withAutoScalingAWS(t *testing.T) {
func TestAccCluster_tenant(t *testing.T) {
var (
resourceName = "mongodbatlas_cluster.tenant"
projectID, clusterName = acc.ProjectIDExecutionWithCluster(t, 3)
projectID, clusterName = acc.ProjectIDExecutionWithCluster(t, 1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup

)

resource.ParallelTest(t, resource.TestCase{
Expand All @@ -1032,12 +1032,12 @@ func TestAccCluster_tenant(t *testing.T) {
CheckDestroy: acc.CheckDestroyCluster,
Steps: []resource.TestStep{
{
Config: configTenant(projectID, clusterName, "M2", "2"),
Config: configTenant(projectID, clusterName, "M5", "5"),
Check: resource.ComposeAggregateTestCheckFunc(
acc.CheckExistsCluster(resourceName),
resource.TestCheckResourceAttrSet(resourceName, "project_id"),
resource.TestCheckResourceAttr(resourceName, "name", clusterName),
resource.TestCheckResourceAttr(resourceName, "disk_size_gb", "2"),
resource.TestCheckResourceAttr(resourceName, "disk_size_gb", "5"),
resource.TestCheckResourceAttrSet(resourceName, "mongo_uri"),
),
},
Expand All @@ -1055,31 +1055,6 @@ func TestAccCluster_tenant(t *testing.T) {
})
}

func TestAccCluster_tenant_m5(t *testing.T) {
var (
resourceName = "mongodbatlas_cluster.tenant"
projectID, clusterName = acc.ProjectIDExecutionWithCluster(t, 1)
)

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { acc.PreCheckBasic(t) },
ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
CheckDestroy: acc.CheckDestroyCluster,
Steps: []resource.TestStep{
{
Config: configTenant(projectID, clusterName, "M5", "5"),
Check: resource.ComposeAggregateTestCheckFunc(
acc.CheckExistsCluster(resourceName),
resource.TestCheckResourceAttrSet(resourceName, "project_id"),
resource.TestCheckResourceAttr(resourceName, "name", clusterName),
resource.TestCheckResourceAttr(resourceName, "disk_size_gb", "5"),
resource.TestCheckResourceAttrSet(resourceName, "mongo_uri"),
),
},
},
})
}

func TestAccCluster_basicGCPRegionNameWesternUS(t *testing.T) {
var (
projectID, clusterName = acc.ProjectIDExecutionWithCluster(t, 3)
Expand Down
2 changes: 1 addition & 1 deletion internal/testutil/unit/http_mocker_api_paths_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

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