mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-06 09:06:44 +00:00
34 lines
732 B
Go
34 lines
732 B
Go
package google
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
|
|
"github.com/hashicorp/terraform/helper/acctest"
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
)
|
|
|
|
func TestAccSqlDatabase_importBasic(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
resourceName := "google_sql_database.database"
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
Providers: testAccProviders,
|
|
CheckDestroy: testAccSqlDatabaseInstanceDestroy,
|
|
Steps: []resource.TestStep{
|
|
resource.TestStep{
|
|
Config: fmt.Sprintf(
|
|
testGoogleSqlDatabase_basic, acctest.RandString(10), acctest.RandString(10)),
|
|
},
|
|
|
|
resource.TestStep{
|
|
ResourceName: resourceName,
|
|
ImportState: true,
|
|
ImportStateVerify: true,
|
|
},
|
|
},
|
|
})
|
|
}
|