MCPcopy
hub / github.com/borgbackup/borg / test_consistency2

Function test_consistency2

src/borg/testsuite/legacyrepository_test.py:176–184  ·  view source on GitHub ↗
(repo_fixtures, request)

Source from the content-addressed store, hash-verified

174
175
176def test_consistency2(repo_fixtures, request):
177 with get_repository_from_fixture(repo_fixtures, request) as repository:
178 repository.put(H(0), fchunk(b"foo"))
179 assert pdchunk(repository.get(H(0))) == b"foo"
180 repository.commit(compact=False)
181 repository.put(H(0), fchunk(b"foo2"))
182 assert pdchunk(repository.get(H(0))) == b"foo2"
183 repository.rollback()
184 assert pdchunk(repository.get(H(0))) == b"foo"
185
186
187def test_overwrite_in_same_transaction(repo_fixtures, request):

Callers

nothing calls this directly

Calls 8

HFunction · 0.70
fchunkFunction · 0.70
pdchunkFunction · 0.70
putMethod · 0.45
getMethod · 0.45
commitMethod · 0.45
rollbackMethod · 0.45

Tested by

no test coverage detected