MCPcopy
hub / github.com/treeverse/dvc / test_protect_local_remote

Function test_protect_local_remote

tests/func/test_remote.py:416–424  ·  view source on GitHub ↗
(tmp_dir, dvc, local_remote)

Source from the content-addressed store, hash-verified

414
415
416def test_protect_local_remote(tmp_dir, dvc, local_remote):
417 (stage,) = tmp_dir.dvc_gen("file", "file content")
418
419 dvc.push()
420 odb = dvc.cloud.get_remote_odb("upstream")
421 remote_cache_file = odb.oid_to_path(stage.outs[0].hash_info.value)
422
423 assert os.path.exists(remote_cache_file)
424 assert stat.S_IMODE(os.stat(remote_cache_file).st_mode) == 0o444
425
426
427def test_push_incomplete_dir(tmp_dir, dvc, mocker, local_remote):

Callers

nothing calls this directly

Calls 5

dvc_genMethod · 0.80
get_remote_odbMethod · 0.80
oid_to_pathMethod · 0.80
pushMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected