Skip to content

Commit

Permalink
tests/lb: Add acceptance test for LB Standard SKU
Browse files Browse the repository at this point in the history
  • Loading branch information
justaugustus committed Jan 5, 2018
1 parent 423695e commit 0d3b9f9
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions azurerm/resource_arm_loadbalancer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,25 @@ func TestAccAzureRMLoadBalancer_basic(t *testing.T) {
})
}

func TestAccAzureRMLoadBalancer_standard(t *testing.T) {
var lb network.LoadBalancer
ri := acctest.RandInt()

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureRMLoadBalancerDestroy,
Steps: []resource.TestStep{
{
Config: testAccAzureRMLoadBalancer_standard(ri, testLocation()),
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMLoadBalancerExists("azurerm_lb.test", &lb),
),
},
},
})
}

func TestAccAzureRMLoadBalancer_frontEndConfig(t *testing.T) {
var lb network.LoadBalancer
resourceName := "azurerm_lb.test"
Expand Down Expand Up @@ -209,6 +228,27 @@ resource "azurerm_lb" "test" {
}`, rInt, location, rInt)
}

func testAccAzureRMLoadBalancer_standard(rInt int, location string) string {
return fmt.Sprintf(`
resource "azurerm_resource_group" "test" {
name = "acctestrg-%d"
location = "%s"
}
resource "azurerm_lb" "test" {
name = "arm-test-loadbalancer-%d"
location = "${azurerm_resource_group.test.location}"
resource_group_name = "${azurerm_resource_group.test.name}"
sku = "Standard"
tags {
Environment = "production"
Purpose = "AcceptanceTests"
}
}`, rInt, location, rInt)
}

func testAccAzureRMLoadBalancer_updatedTags(rInt int, location string) string {
return fmt.Sprintf(`
Expand Down

0 comments on commit 0d3b9f9

Please sign in to comment.