Page MenuHomeSoftware Heritage
Paste P1082

debian stable build
ActivePublic

Authored by ardumont on Jun 29 2021, 12:19 PM.
================================================================================================================== FAILURES ===================================================================================================================
_________________________________________________________________________________ TestDirectoryCooker.test_directory_simple[cook_extract_directory_git_bare] __________________________________________________________________________________
self = <swh.vault.tests.test_cookers.TestDirectoryCooker object at 0x7f26f605d748>, git_loader = <function git_loader.<locals>._create_loader at 0x7f26f5f8f9d8>
cook_extract_directory = <function cook_extract_directory_git_bare at 0x7f26f6299510>
def test_directory_simple(self, git_loader, cook_extract_directory):
repo = TestRepo()
with repo as rp:
(rp / "file").write_text(TEST_CONTENT)
(rp / "executable").write_bytes(TEST_EXECUTABLE)
(rp / "executable").chmod(0o755)
(rp / "link").symlink_to("file")
(rp / "dir1/dir2").mkdir(parents=True)
(rp / "dir1/dir2/file").write_text(TEST_CONTENT)
c = repo.commit()
loader = git_loader(str(rp))
loader.load()
obj_id_hex = repo.repo[c].tree.decode()
obj_id = hashutil.hash_to_bytes(obj_id_hex)
with cook_extract_directory(loader.storage, obj_id) as p:
> assert (p / "file").stat().st_mode == 0o100644
E AssertionError: assert 33204 == 33188
E + where 33204 = os.stat_result(st_mode=33204, st_ino=20455190, st_dev=239, st_nlink=1, st_uid=1000, st_gid=1000, st_size=55, st_atime=1624961754, st_mtime=1624961754, st_ctime=1624961754).st_mode
E + where os.stat_result(st_mode=33204, st_ino=20455190, st_dev=239, st_nlink=1, st_uid=1000, st_gid=1000, st_size=55, st_atime=1624961754, st_mtime=1624961754, st_ctime=1624961754) = <bound method Path.stat of PosixPath('/tmp/tmp-vault-clone-n6oct_ld/file')>()
E + where <bound method Path.stat of PosixPath('/tmp/tmp-vault-clone-n6oct_ld/file')> = (PosixPath('/tmp/tmp-vault-clone-n6oct_ld') / 'file').stat