test: don't forget to copy gcp credentials

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2018-04-07 05:09:45 +03:00
parent 30b71a4b4b
commit f5ef256447
+5 -4
View File
@@ -41,7 +41,11 @@ def should_test_gcp():
if os.getenv("DVC_TEST_GCP") == "true":
return True
if os.getenv("GOOGLE_APPLICATION_CREDENTIALS") and os.getenv("GCP_CREDS"):
creds = os.getenv("GOOGLE_APPLICATION_CREDENTIALS")
if creds and os.getenv("GCP_CREDS"):
if os.path.exists(creds):
os.unlink(creds)
shutil.copyfile(self.GCP_CREDS_FILE, creds)
return True
return False
@@ -182,9 +186,6 @@ class TestDataCloudGCP(TestDataCloudBase):
if not should_test_gcp():
return
if os.getenv("GOOGLE_APPLICATION_CREDENTIALS") and os.getenv("GCP_CREDS"):
shutil.copyfile(self.GCP_CREDS_FILE, os.getenv("GOOGLE_APPLICATION_CREDENTIALS"))
repo = get_gcp_url()
# Setup cloud