Skip to content

Commit 7a7f04a

Browse files
committed
fixup! e2e-tests: cover reserved_storage in no-space scenarios
1 parent 44bc50e commit 7a7f04a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

docker-e2e-test/e2e-test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,19 +1503,19 @@ def run_test_reserved_storage_update_ok(reserved_storage: str):
15031503

15041504
invoke_aklite(['check'])
15051505

1506-
# Fill /var/sota the same way the no-space test does, but stop at 100000 bytes free so the
1506+
# Fill /var/sota the same way the no-space test does, but stop at 20000000 bytes free so the
15071507
# update can still proceed. Combined with a tiny reserved_storage (e.g. "1KiB") this proves
1508-
# the bytes-based path doesn't over-reserve: available (~100KB) - reserved (1KiB) is still
1508+
# the bytes-based path doesn't over-reserve: available (~20MB) - reserved (1KiB) is still
15091509
# enough room for the update to land.
15101510
statvfs = os.statvfs("/var/sota")
15111511
available_bytes = statvfs.f_bavail * statvfs.f_frsize
15121512
logger.info(f"Available space in /var/sota: {available_bytes} bytes")
15131513
if available_bytes > 100000000:
15141514
assert False, "Too much free space left, test environment should be configured to have less than 100MB free space for this test to be effective"
15151515

1516-
if available_bytes > 100000:
1516+
if available_bytes > 20000000:
15171517
with open("/var/sota/fill_space", "wb") as f:
1518-
f.write(b"\0" * (available_bytes - 100000))
1518+
f.write(b"\0" * (available_bytes - 20000000))
15191519

15201520
statvfs = os.statvfs("/var/sota")
15211521
logger.info(f"Available space in /var/sota after filling it up: {statvfs.f_bavail * statvfs.f_frsize} bytes")

0 commit comments

Comments
 (0)