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 + )