mirror of https://github.com/hashicorp/terraform
cdn_profile resource was using `Profiles` instead of `profiles` to gather the name in the read and delete methods, added importing capability with test to confirm read now works as expected. ``` TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMCdnProfile -timeout 120m === RUN TestAccAzureRMCdnProfile_importWithTags --- PASS: TestAccAzureRMCdnProfile_importWithTags (170.00s) === RUN TestAccAzureRMCdnProfile_basic --- PASS: TestAccAzureRMCdnProfile_basic (166.33s) === RUN TestAccAzureRMCdnProfile_withTags --- PASS: TestAccAzureRMCdnProfile_withTags (185.94s) PASS ok github.com/hashicorp/terraform/builtin/providers/azurerm 522.333s ```pull/9306/head
parent
70a90cc1f4
commit
d60b9ab018
@ -0,0 +1,33 @@
|
||||
package azurerm
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/terraform/helper/acctest"
|
||||
"github.com/hashicorp/terraform/helper/resource"
|
||||
)
|
||||
|
||||
func TestAccAzureRMCdnProfile_importWithTags(t *testing.T) {
|
||||
resourceName := "azurerm_cdn_profile.test"
|
||||
|
||||
ri := acctest.RandInt()
|
||||
config := fmt.Sprintf(testAccAzureRMCdnProfile_withTags, ri, ri)
|
||||
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
Providers: testAccProviders,
|
||||
CheckDestroy: testCheckAzureRMCdnProfileDestroy,
|
||||
Steps: []resource.TestStep{
|
||||
resource.TestStep{
|
||||
Config: config,
|
||||
},
|
||||
|
||||
resource.TestStep{
|
||||
ResourceName: resourceName,
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
Loading…
Reference in new issue