tests/objectstore: remove "duplicate" test case
The idea of this test case was to check that two identical trees are
only stored once, via their treesum in the object store; but this
functionality was removed in commit e97f6ef34 and instead of treesums
random uuids are now used. As a result there is no de-duplication
anymore -- the subject of the test. So remove the test.
This commit is contained in:
parent
2d78a0bbea
commit
e0db89284d
1 changed files with 0 additions and 25 deletions
|
|
@ -80,31 +80,6 @@ class TestObjectStore(unittest.TestCase):
|
|||
# there should be no temporary Objects dirs anymore
|
||||
self.assertEqual(len(os.listdir(object_store.tmp)), 0)
|
||||
|
||||
# pylint: disable=no-self-use
|
||||
def test_duplicate(self):
|
||||
with tempfile.TemporaryDirectory(dir="/var/tmp") as tmp:
|
||||
object_store = objectstore.ObjectStore(tmp)
|
||||
with object_store.new() as tree:
|
||||
with tree.write() as path:
|
||||
p = Path(path, "A")
|
||||
p.touch()
|
||||
object_store.commit(tree, "a")
|
||||
|
||||
with object_store.new() as tree:
|
||||
with tree.write() as path:
|
||||
shutil.copy2(f"{object_store.refs}/a/A",
|
||||
os.path.join(path, "A"))
|
||||
object_store.commit(tree, "b")
|
||||
|
||||
assert os.path.exists(f"{object_store.refs}/a")
|
||||
assert os.path.exists(f"{object_store.refs}/a/A")
|
||||
assert os.path.exists(f"{object_store.refs}/b/A")
|
||||
|
||||
assert len(os.listdir(object_store.refs)) == 2
|
||||
assert len(os.listdir(object_store.objects)) == 2
|
||||
assert len(os.listdir(f"{object_store.refs}/a/")) == 1
|
||||
assert len(os.listdir(f"{object_store.refs}/b/")) == 1
|
||||
|
||||
# pylint: disable=no-self-use
|
||||
def test_object_base(self):
|
||||
# operate with a clean object store
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue