Skip to content
Permalink
Browse files
fix(storage): fix system test and change scope for iam access token (#47
)

* 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 bc5375f4c88f7e6ad1afbe7667c49d9a846e9757
Showing with 10 additions and 4 deletions.
  1. +10 −4 tests/system.py
@@ -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 = {}
@@ -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,
@@ -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",

0 comments on commit bc5375f

Please sign in to comment.