mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-08-31 06:10:20 +00:00
32 lines
751 B
Go
32 lines
751 B
Go
![]() |
package google
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/hashicorp/terraform/helper/acctest"
|
||
|
"github.com/hashicorp/terraform/helper/resource"
|
||
|
)
|
||
|
|
||
|
func TestAccLoggingProjectSink_importBasic(t *testing.T) {
|
||
|
t.Parallel()
|
||
|
|
||
|
sinkName := "tf-test-sink-" + acctest.RandString(10)
|
||
|
bucketName := "tf-test-sink-bucket-" + acctest.RandString(10)
|
||
|
|
||
|
resource.Test(t, resource.TestCase{
|
||
|
PreCheck: func() { testAccPreCheck(t) },
|
||
|
Providers: testAccProviders,
|
||
|
Steps: []resource.TestStep{
|
||
|
resource.TestStep{
|
||
|
Config: testAccLoggingProjectSink_basic(sinkName, getTestProjectFromEnv(), bucketName),
|
||
|
},
|
||
|
|
||
|
resource.TestStep{
|
||
|
ResourceName: "google_logging_project_sink.basic",
|
||
|
ImportState: true,
|
||
|
ImportStateVerify: true,
|
||
|
},
|
||
|
},
|
||
|
})
|
||
|
}
|