mirror of https://github.com/hashicorp/terraform
Needed to change the test due to SQS having issues recreating the same queue multiple times. Now it uses a random name ``` make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSQSQueue_' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /vendor/) TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSQSQueue_ -timeout 120m === RUN TestAccAWSSQSQueue_importBasic --- PASS: TestAccAWSSQSQueue_importBasic (20.53s) === RUN TestAccAWSSQSQueue_basic --- PASS: TestAccAWSSQSQueue_basic (33.85s) === RUN TestAccAWSSQSQueue_redrivePolicy --- PASS: TestAccAWSSQSQueue_redrivePolicy (26.59s) === RUN TestAccAWSSQSQueue_Policybasic --- PASS: TestAccAWSSQSQueue_Policybasic (36.92s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 117.908s ```pull/7538/head
parent
21e2173e0a
commit
3d480ca767
@ -0,0 +1,35 @@
|
||||
package aws
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"fmt"
|
||||
|
||||
"github.com/hashicorp/terraform/helper/acctest"
|
||||
"github.com/hashicorp/terraform/helper/resource"
|
||||
)
|
||||
|
||||
func TestAccAWSSQSQueue_importBasic(t *testing.T) {
|
||||
resourceName := "aws_sqs_queue.queue-with-defaults"
|
||||
queueName := fmt.Sprintf("sqs-queue-%s", acctest.RandString(5))
|
||||
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
Providers: testAccProviders,
|
||||
CheckDestroy: testAccCheckAWSSQSQueueDestroy,
|
||||
Steps: []resource.TestStep{
|
||||
resource.TestStep{
|
||||
Config: testAccAWSSQSConfigWithDefaults(queueName),
|
||||
},
|
||||
|
||||
resource.TestStep{
|
||||
ResourceName: resourceName,
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
//The name is never returned after the initial create of the queue.
|
||||
//It is part of the URL and can be split down if needed
|
||||
//ImportStateVerifyIgnore: []string{"name"},
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
Loading…
Reference in new issue