mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
dvc studio login automatically push experiments by default (#10331)
* studio login set auto_push + add logs for the user * set a separate global config dir for studio login tests The `isolate` fixture sets a separate, _isolated_ global config directory. But it is shared among other tests. So any mutations to it affects other tests too. We should force `studio login` tests to use a separate tmp_dir for global config. * cleanup message --------- Co-authored-by: Saugat Pachhai (सौगात) <[email protected]>
This commit is contained in:
co-authored by
Saugat Pachhai
parent
cd1e228e55
commit
b0384f8f51
@@ -1,9 +1,18 @@
|
||||
import pytest
|
||||
from dvc_studio_client.auth import AuthorizationExpiredError
|
||||
|
||||
from dvc import env
|
||||
from dvc.cli import main
|
||||
from dvc.utils.studio import STUDIO_URL
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def global_config_dir(monkeypatch, tmp_dir_factory):
|
||||
monkeypatch.setenv(
|
||||
env.DVC_GLOBAL_CONFIG_DIR, str(tmp_dir_factory.mktemp("studio-login"))
|
||||
)
|
||||
|
||||
|
||||
def test_studio_login_token_check_failed(mocker):
|
||||
mocker.patch(
|
||||
"dvc_studio_client.auth.get_access_token",
|
||||
|
||||
Reference in New Issue
Block a user