From 432fa56315190ac21db06d34c1a210569dd21f8e Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Sun, 1 Jul 2018 02:58:30 +0300 Subject: [PATCH 1/2] test: don't set gs env when running a command --- tests/test_repro.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_repro.py b/tests/test_repro.py index 9f6242f11..620b9ab2e 100644 --- a/tests/test_repro.py +++ b/tests/test_repro.py @@ -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() From fa9a79008bf5c1e4f2c058e7069e0812c0930eb6 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Sun, 1 Jul 2018 03:01:16 +0300 Subject: [PATCH 2/2] test: use gauth --- tests/test_data_cloud.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_data_cloud.py b/tests/test_data_cloud.py index 066f6c6a6..ba8a16ab4 100644 --- a/tests/test_data_cloud.py +++ b/tests/test_data_cloud.py @@ -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