mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 15:28:34 +01:00
test: don't forget to copy gcp credentials
Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user