Skip to content

Commit 5aae934

Browse files
dberenbaumdberenbaum
authored andcommitted
test auto push with tmp dir
1 parent de1338c commit 5aae934

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/func/experiments/test_remote.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,3 +422,18 @@ def test_auto_push_misconfigured(
422422
with caplog.at_level(logging.WARNING, logger="dvc"):
423423
dvc.experiments.run(exp_stage.addressing, params=["foo=2"], name=exp_name)
424424
assert "Failed to validate remotes" in caplog.text
425+
426+
427+
def test_auto_push_tmp_dir(tmp_dir, scm, dvc, git_upstream, local_remote, exp_stage):
428+
remote = git_upstream.remote
429+
430+
with dvc.config.edit() as conf:
431+
conf["exp"]["auto_push"] = True
432+
conf["exp"]["git_remote"] = remote
433+
434+
exp_name = "foo"
435+
dvc.experiments.run(
436+
exp_stage.addressing, params=["foo=2"], name=exp_name, tmp_dir=True
437+
)
438+
439+
assert first(dvc.experiments.push(name=exp_name, git_remote=remote)) == "up_to_date"

0 commit comments

Comments
 (0)