From 7dd0cffd4947143da35917a560b3e5d63e424eb9 Mon Sep 17 00:00:00 2001 From: David de la Iglesia Castro Date: Fri, 8 Apr 2022 17:24:00 +0200 Subject: [PATCH] gdrive: Add test_service_account_using_env_var --- tests/unit/remote/test_gdrive.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/unit/remote/test_gdrive.py b/tests/unit/remote/test_gdrive.py index 9c23c323b..e03ff5642 100644 --- a/tests/unit/remote/test_gdrive.py +++ b/tests/unit/remote/test_gdrive.py @@ -41,3 +41,11 @@ class TestRemoteGDrive: ) with pytest.raises(GDriveAuthError): assert fs.fs + + def test_service_account_using_env_var(self, dvc, monkeypatch): + monkeypatch.setenv(GDriveFileSystem.GDRIVE_CREDENTIALS_DATA, "foo") + GDriveFileSystem( + gdrive_credentials_tmp_dir=dvc.tmp_dir, + gdrive_use_service_account=True, + **self.CONFIG + )