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

azurerm_eventhub_namespace: allow maximum_throughput_units to be zero #2124

Merged
merged 1 commit into from
Oct 30, 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
50 changes: 0 additions & 50 deletions azurerm/import_arm_eventgrid_topic_test.go

This file was deleted.

56 changes: 0 additions & 56 deletions azurerm/import_arm_eventhub_consumer_group_test.go

This file was deleted.

31 changes: 0 additions & 31 deletions azurerm/import_arm_eventhub_namespace_test.go

This file was deleted.

57 changes: 0 additions & 57 deletions azurerm/import_arm_eventhub_test.go

This file was deleted.

16 changes: 12 additions & 4 deletions azurerm/resource_arm_eventgrid_topic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,41 @@ import (
func TestAccAzureRMEventGridTopic_basic(t *testing.T) {
resourceName := "azurerm_eventgrid_topic.test"
ri := acctest.RandInt()
config := testAccAzureRMEventGridTopic_basic(ri)

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureRMEventGridTopicDestroy,
Steps: []resource.TestStep{
{
Config: config,
Config: testAccAzureRMEventGridTopic_basic(ri),
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMEventGridTopicExists(resourceName),
resource.TestCheckResourceAttrSet(resourceName, "endpoint"),
resource.TestCheckResourceAttrSet(resourceName, "primary_access_key"),
resource.TestCheckResourceAttrSet(resourceName, "secondary_access_key"),
),
},
{
ResourceName: resourceName,
ImportState: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we merging the import test into regular resource test ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yep, thats the plan

ImportStateVerify: true,
},
},
})
}

func TestAccAzureRMEventGridTopic_basicWithTags(t *testing.T) {
resourceName := "azurerm_eventgrid_topic.test"
ri := acctest.RandInt()
config := testAccAzureRMEventGridTopic_basicWithTags(ri)

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureRMEventGridTopicDestroy,
Steps: []resource.TestStep{
{
Config: config,
Config: testAccAzureRMEventGridTopic_basicWithTags(ri),
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMEventGridTopicExists(resourceName),
resource.TestCheckResourceAttr(resourceName, "tags.%", "1"),
Expand All @@ -55,6 +58,11 @@ func TestAccAzureRMEventGridTopic_basicWithTags(t *testing.T) {
resource.TestCheckResourceAttrSet(resourceName, "secondary_access_key"),
),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}
Expand Down
35 changes: 23 additions & 12 deletions azurerm/resource_arm_eventhub_consumer_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,69 +11,80 @@ import (
)

func TestAccAzureRMEventHubConsumerGroup_basic(t *testing.T) {

resourceName := "azurerm_eventhub_consumer_group.test"
ri := acctest.RandInt()
config := testAccAzureRMEventHubConsumerGroup_basic(ri, testLocation())

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureRMEventHubConsumerGroupDestroy,
Steps: []resource.TestStep{
{
Config: config,
Config: testAccAzureRMEventHubConsumerGroup_basic(ri, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMEventHubConsumerGroupExists("azurerm_eventhub_consumer_group.test"),
testCheckAzureRMEventHubConsumerGroupExists(resourceName),
),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}

func TestAccAzureRMEventHubConsumerGroup_complete(t *testing.T) {

resourceName := "azurerm_eventhub_consumer_group.test"
ri := acctest.RandInt()
config := testAccAzureRMEventHubConsumerGroup_complete(ri, testLocation())

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureRMEventHubConsumerGroupDestroy,
Steps: []resource.TestStep{
{
Config: config,
Config: testAccAzureRMEventHubConsumerGroup_complete(ri, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMEventHubConsumerGroupExists("azurerm_eventhub_consumer_group.test"),
testCheckAzureRMEventHubConsumerGroupExists(resourceName),
),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}

func TestAccAzureRMEventHubConsumerGroup_userMetadataUpdate(t *testing.T) {
resourceName := "azurerm_eventhub_consumer_group.test"
ri := acctest.RandInt()
preConfig := testAccAzureRMEventHubConsumerGroup_basic(ri, testLocation())
postConfig := testAccAzureRMEventHubConsumerGroup_complete(ri, testLocation())

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureRMEventHubConsumerGroupDestroy,
Steps: []resource.TestStep{
{
Config: preConfig,
Config: testAccAzureRMEventHubConsumerGroup_basic(ri, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMEventHubConsumerGroupExists(resourceName),
),
},
{
Config: postConfig,
Config: testAccAzureRMEventHubConsumerGroup_complete(ri, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMEventHubConsumerGroupExists(resourceName),
resource.TestCheckResourceAttr(resourceName, "user_metadata", "some-meta-data"),
),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}
Expand Down
Loading