mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-20 11:48:24 -06:00
* Update vendored github.com/cyberdelia/heroku-go/v3 * Update heroku provider code to work with the newly generated heroku-go API
44 lines
1.2 KiB
Go
44 lines
1.2 KiB
Go
package heroku
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
|
|
heroku "github.com/cyberdelia/heroku-go/v3"
|
|
"github.com/hashicorp/terraform/helper/acctest"
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
)
|
|
|
|
func TestAccHerokuPipelineCoupling_importBasic(t *testing.T) {
|
|
var coupling heroku.PipelineCoupling
|
|
|
|
appName := fmt.Sprintf("tftest-%s", acctest.RandString(10))
|
|
pipelineName := fmt.Sprintf("tftest-%s", acctest.RandString(10))
|
|
stageName := "development"
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
Providers: testAccProviders,
|
|
CheckDestroy: testAccCheckHerokuPipelineCouplingDestroy,
|
|
Steps: []resource.TestStep{
|
|
{
|
|
Config: testAccCheckHerokuPipelineCouplingConfig_basic(appName, pipelineName, stageName),
|
|
Check: resource.ComposeTestCheckFunc(
|
|
testAccCheckHerokuPipelineCouplingExists("heroku_pipeline_coupling.default", &coupling),
|
|
testAccCheckHerokuPipelineCouplingAttributes(
|
|
&coupling,
|
|
"heroku_pipeline.default",
|
|
stageName,
|
|
),
|
|
),
|
|
},
|
|
{
|
|
ResourceName: "heroku_pipeline_coupling.default",
|
|
ImportState: true,
|
|
ImportStateVerify: true,
|
|
ImportStateVerifyIgnore: []string{"config_vars"},
|
|
},
|
|
},
|
|
})
|
|
}
|