From c1d439767326d06671739ecd2e8d86d77c9e25c7 Mon Sep 17 00:00:00 2001 From: Andreas Kyrris Date: Mon, 17 Oct 2016 15:05:05 +0100 Subject: [PATCH] Update test for azurerm_lb_probe id. --- .../azurerm/resource_arm_loadbalancer_probe_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/builtin/providers/azurerm/resource_arm_loadbalancer_probe_test.go b/builtin/providers/azurerm/resource_arm_loadbalancer_probe_test.go index 386a58441..2bb9f3c32 100644 --- a/builtin/providers/azurerm/resource_arm_loadbalancer_probe_test.go +++ b/builtin/providers/azurerm/resource_arm_loadbalancer_probe_test.go @@ -2,6 +2,7 @@ package azurerm import ( "fmt" + "os" "testing" "github.com/Azure/azure-sdk-for-go/arm/network" @@ -15,6 +16,12 @@ func TestAccAzureRMLoadBalancerProbe_basic(t *testing.T) { ri := acctest.RandInt() probeName := fmt.Sprintf("probe-%d", ri) + testAccPreCheck(t) + subscriptionID := os.Getenv("ARM_SUBSCRIPTION_ID") + probe_id := fmt.Sprintf( + "/subscriptions/%s/resourceGroups/acctestrg-%d/providers/Microsoft.Network/loadBalancers/arm-test-loadbalancer-%d/probes/%s", + subscriptionID, ri, ri, probeName) + resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -25,6 +32,8 @@ func TestAccAzureRMLoadBalancerProbe_basic(t *testing.T) { Check: resource.ComposeTestCheckFunc( testCheckAzureRMLoadBalancerExists("azurerm_lb.test", &lb), testCheckAzureRMLoadBalancerProbeExists(probeName, &lb), + resource.TestCheckResourceAttr( + "azurerm_lb_probe.test", "id", probe_id), ), }, },