mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-03 01:01:06 +00:00
Fix org policies update test to actually update instead of doing a create/delete/create/delete cycle (#573)
This commit is contained in:
parent
231d866eba
commit
eb88e6d40d
@ -19,7 +19,7 @@ func TestAccGoogleOrganizationPolicy_import(t *testing.T) {
|
||||
Config: testAccGoogleOrganizationPolicy_list_allowAll(org),
|
||||
},
|
||||
{
|
||||
ResourceName: "google_organization_policy.listAll",
|
||||
ResourceName: "google_organization_policy.list",
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
},
|
||||
|
@ -86,7 +86,7 @@ func TestAccGoogleOrganizationPolicy_list_allowAll(t *testing.T) {
|
||||
Steps: []resource.TestStep{
|
||||
{
|
||||
Config: testAccGoogleOrganizationPolicy_list_allowAll(org),
|
||||
Check: testAccCheckGoogleOrganizationListPolicyAll("listAll", "ALLOW"),
|
||||
Check: testAccCheckGoogleOrganizationListPolicyAll("list", "ALLOW"),
|
||||
},
|
||||
},
|
||||
})
|
||||
@ -104,7 +104,7 @@ func TestAccGoogleOrganizationPolicy_list_allowSome(t *testing.T) {
|
||||
Steps: []resource.TestStep{
|
||||
{
|
||||
Config: testAccGoogleOrganizationPolicy_list_allowSome(org, project),
|
||||
Check: testAccCheckGoogleOrganizationListPolicyAllowedValues("listSome", []string{project}),
|
||||
Check: testAccCheckGoogleOrganizationListPolicyAllowedValues("list", []string{project}),
|
||||
},
|
||||
},
|
||||
})
|
||||
@ -121,7 +121,7 @@ func TestAccGoogleOrganizationPolicy_list_denySome(t *testing.T) {
|
||||
Steps: []resource.TestStep{
|
||||
{
|
||||
Config: testAccGoogleOrganizationPolicy_list_denySome(org),
|
||||
Check: testAccCheckGoogleOrganizationListPolicyDeniedValues("listSome", DENIED_ORG_POLICIES),
|
||||
Check: testAccCheckGoogleOrganizationListPolicyDeniedValues("list", DENIED_ORG_POLICIES),
|
||||
},
|
||||
},
|
||||
})
|
||||
@ -138,11 +138,11 @@ func TestAccGoogleOrganizationPolicy_list_update(t *testing.T) {
|
||||
Steps: []resource.TestStep{
|
||||
{
|
||||
Config: testAccGoogleOrganizationPolicy_list_allowAll(org),
|
||||
Check: testAccCheckGoogleOrganizationListPolicyAll("listAll", "ALLOW"),
|
||||
Check: testAccCheckGoogleOrganizationListPolicyAll("list", "ALLOW"),
|
||||
},
|
||||
{
|
||||
Config: testAccGoogleOrganizationPolicy_list_denySome(org),
|
||||
Check: testAccCheckGoogleOrganizationListPolicyDeniedValues("listSome", DENIED_ORG_POLICIES),
|
||||
Check: testAccCheckGoogleOrganizationListPolicyDeniedValues("list", DENIED_ORG_POLICIES),
|
||||
},
|
||||
},
|
||||
})
|
||||
@ -270,7 +270,7 @@ resource "google_organization_policy" "bool" {
|
||||
|
||||
func testAccGoogleOrganizationPolicy_list_allowAll(org string) string {
|
||||
return fmt.Sprintf(`
|
||||
resource "google_organization_policy" "listAll" {
|
||||
resource "google_organization_policy" "list" {
|
||||
org_id = "%s"
|
||||
constraint = "constraints/serviceuser.services"
|
||||
|
||||
@ -285,7 +285,7 @@ resource "google_organization_policy" "listAll" {
|
||||
|
||||
func testAccGoogleOrganizationPolicy_list_allowSome(org, project string) string {
|
||||
return fmt.Sprintf(`
|
||||
resource "google_organization_policy" "listSome" {
|
||||
resource "google_organization_policy" "list" {
|
||||
org_id = "%s"
|
||||
constraint = "constraints/compute.trustedImageProjects"
|
||||
|
||||
@ -302,7 +302,7 @@ resource "google_organization_policy" "listSome" {
|
||||
|
||||
func testAccGoogleOrganizationPolicy_list_denySome(org string) string {
|
||||
return fmt.Sprintf(`
|
||||
resource "google_organization_policy" "listSome" {
|
||||
resource "google_organization_policy" "list" {
|
||||
org_id = "%s"
|
||||
constraint = "serviceuser.services"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user