Also adding aggregate checks (soft assertions) as in CLOUDP-256881 so no need to run mongodb_advanced_cluster tests again in another PR.
(although it was not the goal, the file has now 100 fewer lines)
Link to any related issue(s): CLOUDP-256561
Type of change:
[ ] Bug fix (non-breaking change which fixes an issue). Please, add the "bug" label to the PR.
[ ] New feature (non-breaking change which adds functionality). Please, add the "enhancement" label to the PR. A migration guide must be created or updated if the new feature will go in a major version.
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR. A migration guide must be created or updated.
[x] I have checked that this change does not generate any credentials and that they are NOT accidentally logged anywhere.
[x] I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
[x] I have added any necessary documentation (if appropriate)
[x] I have run make fmt and formatted my code
[x] If changes include deprecations or removals, I defined an isolated PR with a relevant title as it will be used in the auto-generated changelog.
[x] If changes include removal or addition of 3rd party GitHub actions, I updated our internal document. Reach out to the APIx Integration slack channel to get access to the internal document.
Further comments
Example of aggregate check fails:
=== CONT TestAccClusterAdvancedCluster_basicTenant
resource_advanced_cluster_test.go:29: Step 1/3 error: Check failed: Check 3/20 error: mongodbatlas_advanced_cluster.test: Attribute 'global_cluster_self_managed_sharding' expected "false678", got "false"
Check 5/20 error: mongodbatlas_advanced_cluster.test: Attribute 'name' expected "test-acc-tf-c-793928882496728491490", got "test-acc-tf-c-7939288824967284914"
Check 7/20 error: data.mongodbatlas_advanced_cluster.test: Attribute 'name' expected "test-acc-tf-c-793928882496728491490", got "test-acc-tf-c-7939288824967284914"
Check 9/20 error: data.mongodbatlas_advanced_cluster.test: Attribute 'global_cluster_self_managed_sharding' expected "false678", got "false"
Check 10/20 error: mongodbatlas_advanced_cluster.test: Attribute 'project_id123' expected to be set
Check 12/20 error: mongodbatlas_advanced_cluster.test: Attribute 'replication_specs.0.region_configs456.#' expected to be set
Check 13/20 error: data.mongodbatlas_advanced_cluster.test: Attribute 'project_id123' expected to be set
Check 15/20 error: data.mongodbatlas_advanced_cluster.test: Attribute 'replication_specs.0.region_configs456.#' expected to be set
--- FAIL: TestAccClusterAdvancedCluster_basicTenant (248.79s)
Description
Refactors
mongodb_advanced_cluster
tests.Also adding aggregate checks (soft assertions) as in CLOUDP-256881 so no need to run
mongodb_advanced_cluster
tests again in another PR.(although it was not the goal, the file has now 100 fewer lines)
Link to any related issue(s): CLOUDP-256561
Type of change:
Required Checklist:
Further comments
Example of aggregate check fails: