mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-06 02:31:05 +00:00
4b77dca918
This reverts commit 8ab9d96d25
and revives
the original commit that adds t.Parallel to all acceptance tests. It
turns out test failures were unrelated to this change (rather, they were
related to quota issues).
38 lines
1.0 KiB
Go
38 lines
1.0 KiB
Go
package google
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"fmt"
|
|
"github.com/hashicorp/terraform/helper/acctest"
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
)
|
|
|
|
func TestAccComputeAutoscaler_importBasic(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
resourceName := "google_compute_autoscaler.foobar"
|
|
|
|
var it_name = fmt.Sprintf("autoscaler-test-%s", acctest.RandString(10))
|
|
var tp_name = fmt.Sprintf("autoscaler-test-%s", acctest.RandString(10))
|
|
var igm_name = fmt.Sprintf("autoscaler-test-%s", acctest.RandString(10))
|
|
var autoscaler_name = fmt.Sprintf("autoscaler-test-%s", acctest.RandString(10))
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
Providers: testAccProviders,
|
|
CheckDestroy: testAccCheckComputeAutoscalerDestroy,
|
|
Steps: []resource.TestStep{
|
|
resource.TestStep{
|
|
Config: testAccComputeAutoscaler_basic(it_name, tp_name, igm_name, autoscaler_name),
|
|
},
|
|
|
|
resource.TestStep{
|
|
ResourceName: resourceName,
|
|
ImportState: true,
|
|
ImportStateVerify: true,
|
|
},
|
|
},
|
|
})
|
|
}
|