mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-06 10:41:07 +00:00
Use a unique key when running project_metadata_item import tests (#274)
CI runs tests concurrently and will interfere with each other with the current global key name.
This commit is contained in:
parent
28f8931f0b
commit
c6ae260d63
@ -3,17 +3,20 @@ package google
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/hashicorp/terraform/helper/acctest"
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
"github.com/hashicorp/terraform/helper/resource"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAccComputeProjectMetadataItem_importBasic(t *testing.T) {
|
func TestAccComputeProjectMetadataItem_importBasic(t *testing.T) {
|
||||||
|
key := "myKey" + acctest.RandString(10)
|
||||||
|
|
||||||
resource.Test(t, resource.TestCase{
|
resource.Test(t, resource.TestCase{
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
PreCheck: func() { testAccPreCheck(t) },
|
||||||
Providers: testAccProviders,
|
Providers: testAccProviders,
|
||||||
CheckDestroy: testAccCheckProjectMetadataItemDestroy,
|
CheckDestroy: testAccCheckProjectMetadataItemDestroy,
|
||||||
Steps: []resource.TestStep{
|
Steps: []resource.TestStep{
|
||||||
{
|
{
|
||||||
Config: testAccProjectMetadataItem_basic("myKey", "myValue"),
|
Config: testAccProjectMetadataItem_basic(key, "myValue"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ResourceName: "google_compute_project_metadata_item.foobar",
|
ResourceName: "google_compute_project_metadata_item.foobar",
|
||||||
|
Loading…
Reference in New Issue
Block a user