2016-09-23 21:43:06 +02:00
|
|
|
package pagerduty
|
|
|
|
|
|
|
|
import (
|
2017-05-11 16:14:30 +02:00
|
|
|
"fmt"
|
2016-09-23 21:43:06 +02:00
|
|
|
"testing"
|
|
|
|
|
2017-05-11 16:14:30 +02:00
|
|
|
"github.com/hashicorp/terraform/helper/acctest"
|
2016-09-23 21:43:06 +02:00
|
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestAccPagerDutyTeam_import(t *testing.T) {
|
2017-05-11 16:14:30 +02:00
|
|
|
team := fmt.Sprintf("tf-%s", acctest.RandString(5))
|
2016-10-20 06:53:51 +02:00
|
|
|
|
2016-09-23 21:43:06 +02:00
|
|
|
resource.Test(t, resource.TestCase{
|
|
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
|
|
Providers: testAccProviders,
|
|
|
|
CheckDestroy: testAccCheckPagerDutyTeamDestroy,
|
|
|
|
Steps: []resource.TestStep{
|
2017-05-11 16:14:30 +02:00
|
|
|
{
|
|
|
|
Config: testAccCheckPagerDutyTeamConfig(team),
|
2016-09-23 21:43:06 +02:00
|
|
|
},
|
2016-10-16 16:48:20 +02:00
|
|
|
|
2017-05-11 16:14:30 +02:00
|
|
|
{
|
|
|
|
ResourceName: "pagerduty_team.foo",
|
2016-09-23 21:43:06 +02:00
|
|
|
ImportState: true,
|
|
|
|
ImportStateVerify: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|