github.com/recobe182/terraform@v0.8.5-0.20170117231232-49ab22a935b7/builtin/providers/aws/import_aws_network_acl_test.go (about) 1 package aws 2 3 import ( 4 "testing" 5 6 "github.com/hashicorp/terraform/helper/resource" 7 ) 8 9 func TestAccAWSNetworkAcl_importBasic(t *testing.T) { 10 /* 11 checkFn := func(s []*terraform.InstanceState) error { 12 // Expect 2: acl, 2 rules 13 if len(s) != 3 { 14 return fmt.Errorf("bad states: %#v", s) 15 } 16 17 return nil 18 } 19 */ 20 21 resource.Test(t, resource.TestCase{ 22 PreCheck: func() { testAccPreCheck(t) }, 23 Providers: testAccProviders, 24 CheckDestroy: testAccCheckAWSNetworkAclDestroy, 25 Steps: []resource.TestStep{ 26 resource.TestStep{ 27 Config: testAccAWSNetworkAclEgressNIngressConfig, 28 }, 29 30 resource.TestStep{ 31 ResourceName: "aws_network_acl.bar", 32 ImportState: true, 33 ImportStateVerify: true, 34 }, 35 }, 36 }) 37 }