Skip to content

Commit

Permalink
Skip signing tests for insufficient credentials (#6917)
Browse files Browse the repository at this point in the history
* Skip signing tests for insufficient credentials
  • Loading branch information
crwilcox committed Dec 14, 2018
1 parent 9cb9f63 commit 20b7f38
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion storage/tests/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from google.cloud.storage.bucket import LifecycleRuleDelete
from google.cloud.storage.bucket import LifecycleRuleSetStorageClass
from google.cloud import kms
import google.oauth2

from test_utils.retry import RetryErrors
from test_utils.system import unique_resource_id
Expand Down Expand Up @@ -703,6 +704,12 @@ class TestStorageSignURLs(TestStorageFiles):
def setUp(self):
super(TestStorageSignURLs, self).setUp()

if (
type(Config.CLIENT._credentials)
is not google.oauth2.service_account.credentials
):
self.skipTest("Signing tests requires a service account credential")

logo_path = self.FILES["logo"]["path"]
with open(logo_path, "rb") as file_obj:
self.LOCAL_FILE = file_obj.read()
Expand Down Expand Up @@ -964,7 +971,6 @@ def test_rewrite_rotate_with_user_project(self):


class TestStorageUpdateStorageClass(TestStorageFiles):

def test_update_storage_class_small_file(self):
blob = self.bucket.blob("SmallFile")

Expand Down

0 comments on commit 20b7f38

Please sign in to comment.