Skip to content

Commit 4c4ed2c

Browse files
kalyazinManciukic
authored andcommitted
test(diff_snapshot_works_after_error): do not rely on log
Since we deliberately create a condition of no space, it is not guaranteed that Firecracker is able to produce complete log messages. Use the API error message instead. Signed-off-by: Nikita Kalyazin <[email protected]>
1 parent 42feab2 commit 4c4ed2c

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

tests/integration_tests/functional/test_snapshot_not_losing_dirty_pages.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,8 @@ def test_diff_snapshot_works_after_error(
5151

5252
subprocess.check_call(f"fallocate -l {target_size} {fill}", shell=True)
5353

54-
try:
54+
with pytest.raises(RuntimeError, match="No space left on device"):
5555
uvm.snapshot_diff()
56-
except RuntimeError:
57-
msg = "No space left on device"
58-
uvm.check_log_message(msg)
59-
else:
60-
assert False, "This should fail"
6156

6257
fill.unlink()
6358

0 commit comments

Comments
 (0)