Skip to content

Integration Tests' Service Accounts

Brian Reilly edited this page Apr 5, 2021 · 2 revisions

Terra UI Integration Tests use GCP Service Accounts

These service accounts accumulate as tests are run and can run up against quotas set up in GCP. This can result in integration test failures where the screenshot looks like this:

This can be remedied by manually cleaning up SAs and/or requesting a quota increase.

Prerequisite

  • a @test.firecloud.org account that has gmail enabled

How to Manually Clean Up Service Accounts

  1. Navigate to https://console.cloud.google.com/iam-admin/quotas?service=iam.googleapis.com&project=saturn-integration-test- where ENV is the non-prod environment in question, logged in with your @test.firecloud.org account
  2. In the "IAM & Admin" left-hand sidebar, click on "Service Accounts"
  3. In the table, look for service accounts with "Name"s that look like "Pet Service Account for user [user-6789abcde-f012-3456-789a@terra-test-users-1.iam.gserviceaccount.co]" and "Key Creation Date" (all the way on the right) of before today and select the checkboxes (all the way to the left) on those rows.
  4. Click on the "Delete" link in the top header (next to "+ CREATE SERVICE ACCOUNT")

How to Request a Quota Increase for Service Accounts

  1. Navigate to https://console.cloud.google.com/iam-admin/quotas?service=iam.googleapis.com&project=saturn-integration-test- where ENV is the non-prod environment in question, logged in with your @test.firecloud.org account
  2. You should see a table of different quotas, click on the "ALL QUOTAS" link in the row with "Service Account Count" in the "Limit Name" column
  3. This should take you to a new table with one line where "Global" is listed under "Location." Click on the checkbox to the left of that line and then the "EDIT QUOTAS" button in the top header
  4. You will then see a form where you can fill out a new quota request using your @test.firecloud.org account
Clone this wiki locally