package opc import ( "fmt" "testing" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" ) func TestAccOPCACL_importBasic(t *testing.T) { resourceName := "opc_compute_acl.test" ri := acctest.RandInt() config := fmt.Sprintf(testAccACLBasic, ri) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckACLDestroy, Steps: []resource.TestStep{ { Config: config, }, { ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, }, }) } func TestAccOPCACL_importDisabled(t *testing.T) { resourceName := "opc_compute_acl.test" ri := acctest.RandInt() config := fmt.Sprintf(testAccACLDisabled, ri) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckACLDestroy, Steps: []resource.TestStep{ { Config: config, }, { ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, }, }) }