-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Adds
auto_indexing
attribute to resource_serverless_instance
(
#2100) * auto_indexing in data sources * auto_indexing in resource * doc * refactor tests * test for auto_indexing * doc change * fix doc * simplify test * fix test * auto_indexing in its test
- Loading branch information
Showing
11 changed files
with
180 additions
and
164 deletions.
There are no files selected for viewing
27 changes: 1 addition & 26 deletions
27
.../privatelinkendpointserverless/resource_privatelink_endpoint_serverless_migration_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,11 @@ | ||
package privatelinkendpointserverless_test | ||
|
||
import ( | ||
"os" | ||
"testing" | ||
|
||
"github.com/hashicorp/terraform-plugin-testing/helper/resource" | ||
"github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/acc" | ||
"github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/mig" | ||
) | ||
|
||
func TestMigServerlessPrivateLinkEndpoint_basic(t *testing.T) { | ||
var ( | ||
resourceName = "mongodbatlas_privatelink_endpoint_serverless.test" | ||
orgID = os.Getenv("MONGODB_ATLAS_ORG_ID") | ||
projectName = acc.RandomProjectName() | ||
instanceName = acc.RandomClusterName() | ||
config = configBasic(orgID, projectName, instanceName, true) | ||
) | ||
|
||
resource.Test(t, resource.TestCase{ | ||
PreCheck: func() { mig.PreCheckBasic(t) }, | ||
CheckDestroy: checkDestroy, | ||
Steps: []resource.TestStep{ | ||
{ | ||
ExternalProviders: mig.ExternalProviders(), | ||
Config: config, | ||
Check: resource.ComposeTestCheckFunc( | ||
checkExists(resourceName), | ||
resource.TestCheckResourceAttr(resourceName, "instance_name", instanceName), | ||
), | ||
}, | ||
mig.TestStepCheckEmptyPlan(config), | ||
}, | ||
}) | ||
mig.CreateAndRunTest(t, basicTestCase(t)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 1 addition & 26 deletions
27
internal/service/serverlessinstance/resource_serverless_instance_migration_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,11 @@ | ||
package serverlessinstance_test | ||
|
||
import ( | ||
"os" | ||
"testing" | ||
|
||
"github.com/hashicorp/terraform-plugin-testing/helper/resource" | ||
"github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/acc" | ||
"github.com/mongodb/terraform-provider-mongodbatlas/internal/testutil/mig" | ||
) | ||
|
||
func TestMigServerlessInstance_basic(t *testing.T) { | ||
var ( | ||
orgID = os.Getenv("MONGODB_ATLAS_ORG_ID") | ||
projectName = acc.RandomProjectName() | ||
instanceName = acc.RandomClusterName() | ||
config = acc.ConfigServerlessInstanceBasic(orgID, projectName, instanceName, true) | ||
) | ||
resource.ParallelTest(t, resource.TestCase{ | ||
PreCheck: func() { mig.PreCheckBasic(t) }, | ||
CheckDestroy: checkDestroy, | ||
Steps: []resource.TestStep{ | ||
{ | ||
ExternalProviders: mig.ExternalProviders(), | ||
Config: config, | ||
Check: resource.ComposeTestCheckFunc( | ||
checkConnectionStringPrivateEndpointIsPresentWithNoElement(resourceName), | ||
checkExists(resourceName), | ||
resource.TestCheckResourceAttr(resourceName, "name", instanceName), | ||
resource.TestCheckResourceAttr(resourceName, "termination_protection_enabled", "false"), | ||
), | ||
}, | ||
mig.TestStepCheckEmptyPlan(config), | ||
}, | ||
}) | ||
mig.CreateAndRunTest(t, basicTestCase(t, mig.ProjectIDGlobal(t))) | ||
} |
Oops, something went wrong.