fix: verify functions handle flat zip extraction

This commit is contained in:
Abdessamad Derraz
2026-04-03 11:50:26 +02:00
parent 6fc2753f3e
commit 9ba8b02ff1
2 changed files with 14 additions and 2 deletions

View File

@@ -3383,10 +3383,17 @@ class TestE2E(unittest.TestCase):
registry_path,
emulators_dir=self.emulators_dir,
)
# Detect flat vs nested ZIP to build expected paths
base = manifest.get("base_destination", "")
is_flat = bool(base) and not any(
n.startswith(base + "/") for n in zip_names
)
manifest_dests = set()
for f in manifest["files"]:
d = f"{base}/{f['dest']}" if base else f["dest"]
if base and not is_flat:
d = f"{base}/{f['dest']}"
else:
d = f["dest"]
manifest_dests.add(d)
self.assertEqual(manifest_dests, zip_names)