From 9ff18502b612656de47c63aade618d3a5be11b70 Mon Sep 17 00:00:00 2001 From: Ivan Shcheklein Date: Wed, 27 Jul 2022 13:15:56 -0700 Subject: [PATCH] add gdrive remote profile field to config --- dvc/config_schema.py | 1 + tests/func/test_config.py | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/dvc/config_schema.py b/dvc/config_schema.py index 87c4b84ca..bd514c611 100644 --- a/dvc/config_schema.py +++ b/dvc/config_schema.py @@ -219,6 +219,7 @@ SCHEMA = { **REMOTE_COMMON, }, "gdrive": { + "profile": str, "gdrive_use_service_account": Bool, "gdrive_client_id": str, "gdrive_client_secret": str, diff --git a/tests/func/test_config.py b/tests/func/test_config.py index 0bc0e3359..9bc437895 100644 --- a/tests/func/test_config.py +++ b/tests/func/test_config.py @@ -279,6 +279,16 @@ def test_load_relative_paths(dvc, field, remote_url): ) +def test_config_gdrive_fields(tmp_dir, dvc): + with dvc.config.edit() as conf: + conf["remote"]["test"] = { + "url": "gdrive://root/test", + "profile": "myprofile", + } + + Config(validate=True) + + def test_config_remote(tmp_dir, dvc, capsys): (tmp_dir / ".dvc" / "config").write_text( "['remote \"myremote\"']\n"