Skip to content

Commit

Permalink
Fix org policies update test to actually update instead of doing a cr…
Browse files Browse the repository at this point in the history
…eate/delete/create/delete cycle (hashicorp#573)
  • Loading branch information
rosbo authored Oct 11, 2017
1 parent 1ec1dc0 commit 97f1b69
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion google/import_google_organization_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down
16 changes: 8 additions & 8 deletions google/resource_google_organization_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
},
},
})
Expand All @@ -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}),
},
},
})
Expand All @@ -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),
},
},
})
Expand All @@ -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),
},
},
})
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit 97f1b69

Please sign in to comment.