Skip to content

Commit

Permalink
Move logging-related billing tests that require permissions beyond Bi…
Browse files Browse the repository at this point in the history
…lling User to master billing account (GoogleCloudPlatform#7337)
  • Loading branch information
roaks3 authored and kubalaguna committed Feb 27, 2023
1 parent 88a80af commit 19076c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestAccLoggingBillingAccountExclusion(t *testing.T) {
}

func testAccLoggingBillingAccountExclusion_basic(t *testing.T) {
billingAccount := getTestBillingAccountFromEnv(t)
billingAccount := getTestMasterBillingAccountFromEnv(t)
exclusionName := "tf-test-exclusion-" + randString(t, 10)
description := "Description " + randString(t, 10)

Expand All @@ -53,7 +53,7 @@ func testAccLoggingBillingAccountExclusion_basic(t *testing.T) {
}

func testAccLoggingBillingAccountExclusion_update(t *testing.T) {
billingAccount := getTestBillingAccountFromEnv(t)
billingAccount := getTestMasterBillingAccountFromEnv(t)
exclusionName := "tf-test-exclusion-" + randString(t, 10)
descriptionBefore := "Basic BillingAccount Logging Exclusion" + randString(t, 10)
descriptionAfter := "Updated Basic BillingAccount Logging Exclusion" + randString(t, 10)
Expand Down Expand Up @@ -84,7 +84,7 @@ func testAccLoggingBillingAccountExclusion_update(t *testing.T) {
}

func testAccLoggingBillingAccountExclusion_multiple(t *testing.T) {
billingAccount := getTestBillingAccountFromEnv(t)
billingAccount := getTestMasterBillingAccountFromEnv(t)

vcrTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func TestAccLoggingBillingAccountSink_basic(t *testing.T) {

sinkName := "tf-test-sink-" + randString(t, 10)
bucketName := "tf-test-sink-bucket-" + randString(t, 10)
billingAccount := getTestBillingAccountFromEnv(t)
billingAccount := getTestMasterBillingAccountFromEnv(t)

var sink logging.LogSink

Expand Down Expand Up @@ -44,7 +44,7 @@ func TestAccLoggingBillingAccountSink_update(t *testing.T) {
sinkName := "tf-test-sink-" + randString(t, 10)
bucketName := "tf-test-sink-bucket-" + randString(t, 10)
updatedBucketName := "tf-test-sink-bucket-" + randString(t, 10)
billingAccount := getTestBillingAccountFromEnv(t)
billingAccount := getTestMasterBillingAccountFromEnv(t)

var sinkBefore, sinkAfter logging.LogSink

Expand Down Expand Up @@ -88,7 +88,7 @@ func TestAccLoggingBillingAccountSink_described(t *testing.T) {

sinkName := "tf-test-sink-" + randString(t, 10)
bucketName := "tf-test-sink-bucket-" + randString(t, 10)
billingAccount := getTestBillingAccountFromEnv(t)
billingAccount := getTestMasterBillingAccountFromEnv(t)

vcrTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand All @@ -111,7 +111,7 @@ func TestAccLoggingBillingAccountSink_disabled(t *testing.T) {

sinkName := "tf-test-sink-" + randString(t, 10)
bucketName := "tf-test-sink-bucket-" + randString(t, 10)
billingAccount := getTestBillingAccountFromEnv(t)
billingAccount := getTestMasterBillingAccountFromEnv(t)

vcrTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand All @@ -134,7 +134,7 @@ func TestAccLoggingBillingAccountSink_updateBigquerySink(t *testing.T) {

sinkName := "tf-test-sink-" + randString(t, 10)
bqDatasetID := "tf_test_sink_" + randString(t, 10)
billingAccount := getTestBillingAccountFromEnv(t)
billingAccount := getTestMasterBillingAccountFromEnv(t)

vcrTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand Down Expand Up @@ -166,7 +166,7 @@ func TestAccLoggingBillingAccountSink_heredoc(t *testing.T) {

sinkName := "tf-test-sink-" + randString(t, 10)
bucketName := "tf-test-sink-bucket-" + randString(t, 10)
billingAccount := getTestBillingAccountFromEnv(t)
billingAccount := getTestMasterBillingAccountFromEnv(t)

var sink logging.LogSink

Expand Down

0 comments on commit 19076c2

Please sign in to comment.