terraform/builtin/providers/heroku/import_heroku_pipeline_test.go

31 lines
731 B
Go

package heroku
import (
"fmt"
"testing"
"github.com/hashicorp/terraform/helper/acctest"
"github.com/hashicorp/terraform/helper/resource"
)
func TestAccHerokuPipeline_importBasic(t *testing.T) {
pName := fmt.Sprintf("tftest-%s", acctest.RandString(10))
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckHerokuPipelineDestroy,
Steps: []resource.TestStep{
{
Config: testAccCheckHerokuPipelineConfig_basic(pName),
},
{
ResourceName: "heroku_pipeline.foobar",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"config_vars"},
},
},
})
}