Skip to content

Commit b3d1c6d

Browse files
fix TestAccBillingAccountIam - test improperly set up (#8021) (#5690)
Signed-off-by: Modular Magician <[email protected]>
1 parent 38f5e00 commit b3d1c6d

File tree

2 files changed

+3
-30
lines changed

2 files changed

+3
-30
lines changed

.changelog/8021.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

google-beta/resource_google_billing_account_iam_test.go

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,6 @@ func TestAccBillingAccountIam(t *testing.T) {
7070
ImportState: true,
7171
ImportStateVerify: true,
7272
},
73-
{
74-
// Test Iam Policy creation
75-
Config: testAccBillingAccountDatasetIamPolicy(account, billing, role),
76-
Check: resource.TestCheckResourceAttrSet("data.google_billing_account_iam_policy.policy", "policy_data"),
77-
},
7873
},
7974
})
8075
}
@@ -199,28 +194,3 @@ resource "google_billing_account_iam_member" "foo" {
199194
}
200195
`, account, billingAccountId, role)
201196
}
202-
203-
func testAccBillingAccountDatasetIamPolicy(account, billing, role string) string {
204-
return fmt.Sprintf(testBigqueryDatasetIam+`
205-
resource "google_service_account" "test-account" {
206-
account_id = "%s"
207-
display_name = "Bigquery Dataset IAM Testing Account"
208-
}
209-
210-
data "google_iam_policy" "policy" {
211-
binding {
212-
role = "%s"
213-
members = ["serviceAccount:${google_service_account.test-account.email}"]
214-
}
215-
}
216-
217-
resource "google_billing_account_iam_policy" "policy" {
218-
billing_account_id = "%s"
219-
policy_data = data.google_iam_policy.policy.policy_data
220-
}
221-
222-
data "google_billing_account_iam_policy" "policy" {
223-
billing_account_id = "%s"
224-
}
225-
`, account, role, billing, billing)
226-
}

0 commit comments

Comments
 (0)