Merge pull request #838 from iterative/efiop-patch-1

test: use gauth before gsutil
This commit is contained in:
Ruslan Kuprieiev
2018-07-01 03:09:30 +03:00
committed by GitHub
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -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
View File
@@ -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()