terraform-provider-google/google/import_google_organization_policy_test.go
Vincent Roseberry 87f3a58cb2 Add support for org policies at the organization level (#523)
* Fetch latest resource manager client
* Add new resource to manage Org Policy at the organization level.
* Update documentation
2017-10-05 13:20:16 -07:00

29 lines
647 B
Go

package google
import (
"github.com/hashicorp/terraform/helper/resource"
"os"
"testing"
)
func TestAccGoogleOrganizationPolicy_import(t *testing.T) {
skipIfEnvNotSet(t, "GOOGLE_ORG")
org := os.Getenv("GOOGLE_ORG")
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckGoogleOrganizationPolicyDestroy,
Steps: []resource.TestStep{
{
Config: testAccGoogleOrganizationPolicy_list_allowAll(org),
},
{
ResourceName: "google_organization_policy.listAll",
ImportState: true,
ImportStateVerify: true,
},
},
})
}