mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-20 11:48:24 -06:00
* provider/aws: New resource codepipeline * Vendor aws/codepipeline * Add tests * Add docs * Bump codepipeline to v1.6.25 * Adjustments based on feedback * Force new resource on ID change * Improve tests * Switch update to read Since we don't require a second pass, only do a read. * Skip tests if GITHUB_TOKEN is not set
35 lines
758 B
Go
35 lines
758 B
Go
package aws
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
|
|
"github.com/hashicorp/terraform/helper/acctest"
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
)
|
|
|
|
func TestAccAWSCodePipeline_Import_basic(t *testing.T) {
|
|
if os.Getenv("GITHUB_TOKEN") == "" {
|
|
t.Skip("Environment variable GITHUB_TOKEN is not set")
|
|
}
|
|
|
|
name := acctest.RandString(10)
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
Providers: testAccProviders,
|
|
CheckDestroy: testAccCheckAWSCodePipelineDestroy,
|
|
Steps: []resource.TestStep{
|
|
resource.TestStep{
|
|
Config: testAccAWSCodePipelineConfig_basic(name),
|
|
},
|
|
|
|
resource.TestStep{
|
|
ResourceName: "aws_codepipeline.bar",
|
|
ImportState: true,
|
|
ImportStateVerify: true,
|
|
},
|
|
},
|
|
})
|
|
}
|