mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-19 23:11:44 +01:00
Merge pull request #838 from iterative/efiop-patch-1
test: use gauth before gsutil
This commit is contained in:
@@ -45,6 +45,8 @@ def _should_test_gcp():
|
||||
if os.path.exists(creds):
|
||||
os.unlink(creds)
|
||||
shutil.copyfile(TestDvc.GCP_CREDS_FILE, creds)
|
||||
ret = os.system('gcloud auth activate-service-account --key-file={}'.format(creds))
|
||||
assert ret == 0
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
+1
-1
@@ -380,7 +380,7 @@ class TestReproExternalGS(TestReproExternalBase):
|
||||
return TEST_GCP_REPO_BUCKET
|
||||
|
||||
def cmd(self, i, o):
|
||||
return 'GOOGLE_APPLICATION_CREDENTIALS={} gsutil cp {} {}'.format(os.getenv('GOOGLE_APPLICATION_CREDENTIALS',''), i, o)
|
||||
return 'gsutil cp {} {}'.format(i, o)
|
||||
|
||||
def write(self, bucket, key, body):
|
||||
client = gc.Client()
|
||||
|
||||
Reference in New Issue
Block a user