terraform/builtin/providers/pagerduty/import_pagerduty_team_test.go

31 lines
638 B
Go
Raw Normal View History

2016-09-23 21:43:06 +02:00
package pagerduty
import (
"fmt"
2016-09-23 21:43:06 +02:00
"testing"
"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) {
team := fmt.Sprintf("tf-%s", acctest.RandString(5))
2016-09-23 21:43:06 +02:00
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckPagerDutyTeamDestroy,
Steps: []resource.TestStep{
{
Config: testAccCheckPagerDutyTeamConfig(team),
2016-09-23 21:43:06 +02:00
},
2016-10-16 16:48:20 +02:00
{
ResourceName: "pagerduty_team.foo",
2016-09-23 21:43:06 +02:00
ImportState: true,
ImportStateVerify: true,
},
},
})
}