Skip to content
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

Updates and bug fixes to azurerm_cosmosdb_account #1055

Merged
merged 14 commits into from
Apr 17, 2018
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
28 changes: 14 additions & 14 deletions azurerm/import_arm_cosmosdb_account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ package azurerm
import (
"testing"

"github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb"
"github.com/hashicorp/terraform/helper/acctest"
"github.com/hashicorp/terraform/helper/resource"
)

func TestAccAzureRMCosmosDBAccount_importBoundedStaleness(t *testing.T) {
func TestAccAzureRMCosmosDBAccount_importEventualConsistency(t *testing.T) {
resourceName := "azurerm_cosmosdb_account.test"

ri := acctest.RandInt()
config := testAccAzureRMCosmosDBAccount_boundedStaleness(ri, testLocation())
config := testAccAzureRMCosmosDBAccount_basic(ri, testLocation(), string(documentdb.Eventual), "", "")

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand All @@ -31,11 +32,11 @@ func TestAccAzureRMCosmosDBAccount_importBoundedStaleness(t *testing.T) {
})
}

func TestAccAzureRMCosmosDBAccount_importBoundedStalenessComplete(t *testing.T) {
func TestAccAzureRMCosmosDBAccount_importSession(t *testing.T) {
resourceName := "azurerm_cosmosdb_account.test"

ri := acctest.RandInt()
config := testAccAzureRMCosmosDBAccount_boundedStalenessComplete(ri, testLocation())
config := testAccAzureRMCosmosDBAccount_basic(ri, testLocation(), string(documentdb.Session), "", "")

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand All @@ -55,11 +56,11 @@ func TestAccAzureRMCosmosDBAccount_importBoundedStalenessComplete(t *testing.T)
})
}

func TestAccAzureRMCosmosDBAccount_importEventualConsistency(t *testing.T) {
func TestAccAzureRMCosmosDBAccount_importStrong(t *testing.T) {
resourceName := "azurerm_cosmosdb_account.test"

ri := acctest.RandInt()
config := testAccAzureRMCosmosDBAccount_eventualConsistency(ri, testLocation())
config := testAccAzureRMCosmosDBAccount_basic(ri, testLocation(), string(documentdb.Strong), "", "")

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand All @@ -79,11 +80,11 @@ func TestAccAzureRMCosmosDBAccount_importEventualConsistency(t *testing.T) {
})
}

func TestAccAzureRMCosmosDBAccount_importMongoDB(t *testing.T) {
func TestAccAzureRMCosmosDBAccount_importBoundedStaleness(t *testing.T) {
resourceName := "azurerm_cosmosdb_account.test"

ri := acctest.RandInt()
config := testAccAzureRMCosmosDBAccount_mongoDB(ri, testLocation())
config := testAccAzureRMCosmosDBAccount_basic(ri, testLocation(), string(documentdb.BoundedStaleness), "", "")

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand All @@ -103,11 +104,11 @@ func TestAccAzureRMCosmosDBAccount_importMongoDB(t *testing.T) {
})
}

func TestAccAzureRMCosmosDBAccount_importSession(t *testing.T) {
func TestAccAzureRMCosmosDBAccount_importBoundedStalenessComplete(t *testing.T) {
resourceName := "azurerm_cosmosdb_account.test"

ri := acctest.RandInt()
config := testAccAzureRMCosmosDBAccount_session(ri, testLocation())
config := testAccAzureRMCosmosDBAccount_boundedStaleness_complete(ri, testLocation())

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand All @@ -127,11 +128,11 @@ func TestAccAzureRMCosmosDBAccount_importSession(t *testing.T) {
})
}

func TestAccAzureRMCosmosDBAccount_importStrong(t *testing.T) {
func TestAccAzureRMCosmosDBAccount_importMongoDB(t *testing.T) {
resourceName := "azurerm_cosmosdb_account.test"

ri := acctest.RandInt()
config := testAccAzureRMCosmosDBAccount_strong(ri, testLocation())
config := testAccAzureRMCosmosDBAccount_mongoDB(ri, testLocation())

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand All @@ -141,7 +142,6 @@ func TestAccAzureRMCosmosDBAccount_importStrong(t *testing.T) {
{
Config: config,
},

{
ResourceName: resourceName,
ImportState: true,
Expand All @@ -155,7 +155,7 @@ func TestAccAzureRMCosmosDBAccount_importGeoReplicated(t *testing.T) {
resourceName := "azurerm_cosmosdb_account.test"

ri := acctest.RandInt()
config := testAccAzureRMCosmosDBAccount_geoReplicated(ri, testLocation(), testAltLocation())
config := testAccAzureRMCosmosDBAccount_geoReplicated_customId(ri, testLocation(), testAltLocation())

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand Down
Loading