mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
stage: commit cached stage to avoid data duplication
Fixes #1655 Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
@@ -475,3 +475,24 @@ class TestShouldNotTrackGitInternalFiles(TestDvc):
|
||||
created_stages_filenames = stage_creator_spy.mock.call_args[0][0]
|
||||
for fname in created_stages_filenames:
|
||||
self.assertNotIn(".git", fname)
|
||||
|
||||
|
||||
class TestAddUnprotected(TestDvc):
|
||||
def test(self):
|
||||
ret = main(["config", "cache.type", "hardlink"])
|
||||
self.assertEqual(ret, 0)
|
||||
|
||||
ret = main(["config", "cache.protected", "true"])
|
||||
self.assertEqual(ret, 0)
|
||||
|
||||
ret = main(["add", self.FOO])
|
||||
self.assertEqual(ret, 0)
|
||||
|
||||
ret = main(["unprotect", self.FOO])
|
||||
self.assertEqual(ret, 0)
|
||||
|
||||
ret = main(["add", self.FOO])
|
||||
self.assertEqual(ret, 0)
|
||||
|
||||
self.assertFalse(os.access(self.FOO, os.W_OK))
|
||||
self.assertTrue(System.is_hardlink(self.FOO))
|
||||
|
||||
Reference in New Issue
Block a user