mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-07 14:44:11 -06:00
d920105440
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMSubnet -timeout 120m === RUN TestAccAzureRMSubnet_importBasic --- PASS: TestAccAzureRMSubnet_importBasic (165.04s) === RUN TestAccAzureRMSubnet_basic --- PASS: TestAccAzureRMSubnet_basic (165.39s) === RUN TestAccAzureRMSubnet_disappears --- PASS: TestAccAzureRMSubnet_disappears (170.02s) PASS ok github.com/hashicorp/terraform/builtin/providers/azurerm 500.533s
34 lines
708 B
Go
34 lines
708 B
Go
package azurerm
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
|
|
"github.com/hashicorp/terraform/helper/acctest"
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
)
|
|
|
|
func TestAccAzureRMSubnet_importBasic(t *testing.T) {
|
|
resourceName := "azurerm_subnet.test"
|
|
|
|
ri := acctest.RandInt()
|
|
config := fmt.Sprintf(testAccAzureRMSubnet_basic, ri, ri, ri)
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
Providers: testAccProviders,
|
|
CheckDestroy: testCheckAzureRMSubnetDestroy,
|
|
Steps: []resource.TestStep{
|
|
resource.TestStep{
|
|
Config: config,
|
|
},
|
|
|
|
resource.TestStep{
|
|
ResourceName: resourceName,
|
|
ImportState: true,
|
|
ImportStateVerify: true,
|
|
},
|
|
},
|
|
})
|
|
}
|