(tmp_dir, dvc, make_remote)
| 575 | |
| 576 | |
| 577 | def test_output_remote(tmp_dir, dvc, make_remote): |
| 578 | make_remote("default", default=True) |
| 579 | make_remote("for_foo", default=False) |
| 580 | make_remote("for_data", default=False) |
| 581 | |
| 582 | tmp_dir.dvc_gen("foo", "foo") |
| 583 | tmp_dir.dvc_gen("bar", "bar") |
| 584 | tmp_dir.dvc_gen("data", {"one": "one", "two": "two"}) |
| 585 | |
| 586 | with (tmp_dir / "foo.dvc").modify() as d: |
| 587 | d["outs"][0]["remote"] = "for_foo" |
| 588 | |
| 589 | with (tmp_dir / "data.dvc").modify() as d: |
| 590 | d["outs"][0]["remote"] = "for_data" |
| 591 | |
| 592 | dvc.push() |
| 593 | |
| 594 | default = dvc.cloud.get_remote_odb("default") |
| 595 | for_foo = dvc.cloud.get_remote_odb("for_foo") |
| 596 | for_data = dvc.cloud.get_remote_odb("for_data") |
| 597 | |
| 598 | assert set(default.all()) == {"37b51d194a7513e45b56f6524f2d51f2"} |
| 599 | assert set(for_foo.all()) == {"acbd18db4cc2f85cedef654fccc4a4d8"} |
| 600 | assert set(for_data.all()) == { |
| 601 | "f97c5d29941bfb1b2fdab0874906ab82", |
| 602 | "6b18131dc289fd37006705affe961ef8.dir", |
| 603 | "b8a9f715dbb64fd5c56e7783c6820a61", |
| 604 | } |
| 605 | |
| 606 | clean(["foo", "bar", "data"], dvc) |
| 607 | |
| 608 | assert dvc.pull() == empty_pull | { |
| 609 | "added": ["data" + os.sep, "bar", "foo"], |
| 610 | "stats": empty_stats | {"fetched": 5, "added": 4}, |
| 611 | } |
| 612 | |
| 613 | assert set(dvc.cache.local.all()) == { |
| 614 | "37b51d194a7513e45b56f6524f2d51f2", |
| 615 | "acbd18db4cc2f85cedef654fccc4a4d8", |
| 616 | "f97c5d29941bfb1b2fdab0874906ab82", |
| 617 | "6b18131dc289fd37006705affe961ef8.dir", |
| 618 | "b8a9f715dbb64fd5c56e7783c6820a61", |
| 619 | } |
| 620 | |
| 621 | |
| 622 | def test_target_remote(tmp_dir, dvc, make_remote): |
nothing calls this directly
no test coverage detected