Move test to test_data_cloud.

This commit is contained in:
Karthikeyan Singaravelan
2022-05-11 18:37:09 +03:00
committed by Ruslan Kuprieiev
parent 9b3873c4f0
commit 8d99ce06aa
2 changed files with 17 additions and 20 deletions
+16
View File
@@ -8,6 +8,7 @@ from flaky.flaky_decorator import flaky
import dvc as dvc_module
from dvc.cli import main
from dvc.data.db.local import LocalObjectDB
from dvc.exceptions import GlobDoesNotMatchError
from dvc.external_repo import clean_repos
from dvc.objects.db import ObjectDB
from dvc.stage.exceptions import StageNotFound
@@ -570,3 +571,18 @@ def test_target_remote(tmp_dir, dvc, make_remote):
"6b18131dc289fd37006705affe961ef8.dir",
"b8a9f715dbb64fd5c56e7783c6820a61",
}
def test_push_pull_glob_no_match(
tmp_dir, dvc, erepo_dir, run_copy, local_remote
):
tmp_dir.gen("foo", "foo")
erepo_dir.add_remote(config=local_remote.config)
with erepo_dir.chdir():
with pytest.raises(GlobDoesNotMatchError):
dvc.push(targets="b*", glob=True)
with pytest.raises(GlobDoesNotMatchError):
dvc.pull(targets="b*", glob=True)
assert not os.path.exists(erepo_dir.dvc.stage_cache.cache_dir)