package opc import ( "testing" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" ) func TestAccOPCSecurityRule_importBasic(t *testing.T) { resourceName := "opc_compute_security_rule.test" ri := acctest.RandInt() config := testAccOPCSecurityRuleConfig_Basic(ri) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckSecurityRuleDestroy, Steps: []resource.TestStep{ { Config: config, }, { ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, }, }) } func TestAccOPCSecurityRule_importFull(t *testing.T) { resourceName := "opc_compute_security_rule.test" ri := acctest.RandInt() config := testAccOPCSecurityRuleConfig_Full(ri) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckSecurityRuleDestroy, Steps: []resource.TestStep{ { Config: config, }, { ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, }, }) }