mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-07 14:44:11 -06:00
b4051d0b98
``` % make testacc TEST=./builtin/providers/azurerm TESTARGS='-run=TestAccAzureRMDnsZone_' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) TF_ACC=1 go test ./builtin/providers/azurerm -v -run=TestAccAzureRMDnsZone_ -timeout 120m === RUN TestAccAzureRMDnsZone_importBasic --- PASS: TestAccAzureRMDnsZone_importBasic (88.68s) === RUN TestAccAzureRMDnsZone_basic --- PASS: TestAccAzureRMDnsZone_basic (93.18s) PASS ok github.com/hashicorp/terraform/builtin/providers/azurerm 181.874s ```
35 lines
789 B
Go
35 lines
789 B
Go
package azurerm
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
|
|
"github.com/hashicorp/terraform/helper/acctest"
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
)
|
|
|
|
func TestAccAzureRMDnsZone_importBasic(t *testing.T) {
|
|
resourceName := "azurerm_dns_zone.test"
|
|
|
|
ri := acctest.RandInt()
|
|
config := fmt.Sprintf(testAccAzureRMDnsZone_basic, ri, ri)
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
Providers: testAccProviders,
|
|
CheckDestroy: testCheckAzureRMDnsZoneDestroy,
|
|
Steps: []resource.TestStep{
|
|
resource.TestStep{
|
|
Config: config,
|
|
},
|
|
|
|
resource.TestStep{
|
|
ResourceName: resourceName,
|
|
ImportState: true,
|
|
ImportStateVerify: true,
|
|
ImportStateVerifyIgnore: []string{"resource_group_name"},
|
|
},
|
|
},
|
|
})
|
|
}
|