mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-06 09:06:44 +00:00
31 lines
689 B
Go
31 lines
689 B
Go
package google
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/hashicorp/terraform/helper/acctest"
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
)
|
|
|
|
func TestAccProjectIamCustomRole_import(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
roleId := "tfIamRole" + acctest.RandString(10)
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
Providers: testAccProviders,
|
|
CheckDestroy: testAccCheckGoogleProjectIamCustomRoleDestroy,
|
|
Steps: []resource.TestStep{
|
|
{
|
|
Config: testAccCheckGoogleProjectIamCustomRole_update(roleId),
|
|
},
|
|
{
|
|
ResourceName: "google_project_iam_custom_role.foo",
|
|
ImportState: true,
|
|
ImportStateVerify: true,
|
|
},
|
|
},
|
|
})
|
|
}
|