package pagerduty import ( "fmt" "testing" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" ) func TestAccPagerDutySchedule_import(t *testing.T) { username := fmt.Sprintf("tf-%s", acctest.RandString(5)) email := fmt.Sprintf("%s@foo.com", username) schedule := fmt.Sprintf("tf-%s", acctest.RandString(5)) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckPagerDutyUserDestroy, Steps: []resource.TestStep{ { Config: testAccCheckPagerDutyScheduleConfig(username, email, schedule), }, { ResourceName: "pagerduty_schedule.foo", ImportState: true, ImportStateVerify: true, }, }, }) }