mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-06 17:16:44 +00:00
32 lines
815 B
Go
32 lines
815 B
Go
package google
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/hashicorp/terraform/helper/acctest"
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
"testing"
|
|
)
|
|
|
|
func TestAccComputeBackendBucket_import(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
backendName := fmt.Sprintf("tf-test-%s", acctest.RandString(10))
|
|
storageName := fmt.Sprintf("tf-test-%s", acctest.RandString(10))
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
Providers: testAccProviders,
|
|
CheckDestroy: testAccCheckComputeBackendBucketDestroy,
|
|
Steps: []resource.TestStep{
|
|
resource.TestStep{
|
|
Config: testAccComputeBackendBucket_basic(backendName, storageName),
|
|
},
|
|
resource.TestStep{
|
|
ResourceName: "google_compute_backend_bucket.foobar",
|
|
ImportState: true,
|
|
ImportStateVerify: true,
|
|
},
|
|
},
|
|
})
|
|
}
|