Skip to content

Commit

Permalink
test: check that /var/log got created with the right size
Browse files Browse the repository at this point in the history
  • Loading branch information
mvo5 committed May 28, 2024
1 parent 773a9cb commit 5fc5e6b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,12 +383,17 @@ def test_image_boots(image_type):

# Figure out how big / is and make sure it is > 10GiB
# Note that df output is in 1k blocks, not bytes
found_var_log = False
for line in output.splitlines():
fields = line.split()
if fields[0] == "/sysroot":
size = int(fields[1])
assert size > 10 * 1024 * 1024
break
elif fields[0] == "/var/log":
size = int(fields[1])
assert size == 1 * 1024 * 1024
found_var_log
assert found_var_log, f"no /var/log mount found in {output}"


@pytest.mark.parametrize("image_type", gen_testcases("ami-boot"), indirect=["image_type"])
Expand Down

0 comments on commit 5fc5e6b

Please sign in to comment.