github.com/minamijoyo/terraform@v0.7.8-0.20161029001309-18b3736ba44b/builtin/providers/rabbitmq/import_policy_test.go (about) 1 package rabbitmq 2 3 import ( 4 "testing" 5 6 "github.com/michaelklishin/rabbit-hole" 7 8 "github.com/hashicorp/terraform/helper/resource" 9 ) 10 11 func TestAccPolicy_importBasic(t *testing.T) { 12 resourceName := "rabbitmq_policy.test" 13 var policy rabbithole.Policy 14 15 resource.Test(t, resource.TestCase{ 16 PreCheck: func() { testAccPreCheck(t) }, 17 Providers: testAccProviders, 18 CheckDestroy: testAccPolicyCheckDestroy(&policy), 19 Steps: []resource.TestStep{ 20 resource.TestStep{ 21 Config: testAccPolicyConfig_basic, 22 Check: testAccPolicyCheck( 23 resourceName, &policy, 24 ), 25 }, 26 27 resource.TestStep{ 28 ResourceName: resourceName, 29 ImportState: true, 30 ImportStateVerify: true, 31 }, 32 }, 33 }) 34 }