mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-08 15:13:56 -06:00
b310842383
``` make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSNSTopic_' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /vendor/) TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSNSTopic_ -timeout 120m === RUN TestAccAWSSNSTopic_importBasic --- PASS: TestAccAWSSNSTopic_importBasic (17.02s) === RUN TestAccAWSSNSTopic_basic --- PASS: TestAccAWSSNSTopic_basic (16.59s) === RUN TestAccAWSSNSTopic_withIAMRole --- PASS: TestAccAWSSNSTopic_withIAMRole (28.90s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 62.536s ```
29 lines
581 B
Go
29 lines
581 B
Go
package aws
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
)
|
|
|
|
func TestAccAWSSNSTopic_importBasic(t *testing.T) {
|
|
resourceName := "aws_sns_topic.test_topic"
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
Providers: testAccProviders,
|
|
CheckDestroy: testAccCheckAWSSNSTopicDestroy,
|
|
Steps: []resource.TestStep{
|
|
resource.TestStep{
|
|
Config: testAccAWSSNSTopicConfig,
|
|
},
|
|
|
|
resource.TestStep{
|
|
ResourceName: resourceName,
|
|
ImportState: true,
|
|
ImportStateVerify: true,
|
|
},
|
|
},
|
|
})
|
|
}
|