Skip to content

Commit

Permalink
fix(storage): fix system test and change scope for iam access token (#47
Browse files Browse the repository at this point in the history
)

* fix(storage): change scope for iam access token

* fix: narrow scope

* fix: trailing commas

* chore: blacken

Co-authored-by: Christopher Wilcox <crwilcox@google.com>
  • Loading branch information
HemangChothani and crwilcox committed Feb 12, 2020
1 parent 8904aee commit bc5375f
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/system.py
Expand Up @@ -968,8 +968,8 @@ def _create_signed_read_url_helper(
method=method,
client=Config.CLIENT,
version=version,
service_account_email=None,
access_token=None,
service_account_email=service_account_email,
access_token=access_token,
)

headers = {}
Expand Down Expand Up @@ -1046,7 +1046,10 @@ def test_create_signed_read_url_v2_w_access_token(self):
client = iam_credentials_v1.IAMCredentialsClient()
service_account_email = Config.CLIENT._credentials.service_account_email
name = client.service_account_path("-", service_account_email)
scope = ["https://www.googleapis.com/auth/devstorage.read_write"]
scope = [
"https://www.googleapis.com/auth/devstorage.read_write",
"https://www.googleapis.com/auth/iam",
]
response = client.generate_access_token(name, scope)
self._create_signed_read_url_helper(
service_account_email=service_account_email,
Expand All @@ -1057,7 +1060,10 @@ def test_create_signed_read_url_v4_w_access_token(self):
client = iam_credentials_v1.IAMCredentialsClient()
service_account_email = Config.CLIENT._credentials.service_account_email
name = client.service_account_path("-", service_account_email)
scope = ["https://www.googleapis.com/auth/devstorage.read_write"]
scope = [
"https://www.googleapis.com/auth/devstorage.read_write",
"https://www.googleapis.com/auth/iam",
]
response = client.generate_access_token(name, scope)
self._create_signed_read_url_helper(
version="v4",
Expand Down

0 comments on commit bc5375f

Please sign in to comment.