Skip to content

Commit e06f5f5

Browse files
kalyazinroypat
authored andcommitted
test: update expected error strings
This is because the error type has changed due the implementation of snapshot restore support for Secret Free VMs. Signed-off-by: Nikita Kalyazin <[email protected]>
1 parent 96391b8 commit e06f5f5

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

tests/integration_tests/functional/test_snapshot_basic.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,9 @@ def test_negative_snapshot_permissions(uvm_plain_rw, microvm_factory):
335335
microvm.spawn()
336336

337337
expected_err = re.escape(
338-
"Load snapshot error: Failed to restore from snapshot: Failed to load guest "
339-
"memory: Error creating guest memory from file: Failed to load guest memory: "
340-
"Permission denied (os error 13)"
338+
"Load snapshot error: Failed to restore from snapshot: Failed to build microVM "
339+
"from snapshot: Failed to load guest memory: Error creating guest memory from file: "
340+
"Failed to load guest memory: Permission denied (os error 13)"
341341
)
342342
with pytest.raises(RuntimeError, match=expected_err):
343343
microvm.restore_from_snapshot(snapshot, resume=True)

tests/integration_tests/functional/test_uffd.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ def test_bad_socket_path(uvm_plain, snapshot):
4545
jailed_vmstate = vm.create_jailed_resource(snapshot.vmstate)
4646

4747
expected_msg = re.escape(
48-
"Load snapshot error: Failed to restore from snapshot: Failed to load guest "
49-
"memory: Error creating guest memory from uffd: Failed to connect to UDS Unix stream: No "
50-
"such file or directory (os error 2)"
48+
"Load snapshot error: Failed to restore from snapshot: Failed to build microVM from "
49+
"snapshot: Failed to load guest memory: Error creating guest memory from uffd: Failed "
50+
"to connect to UDS Unix stream: No such file or directory (os error 2)"
5151
)
5252
with pytest.raises(RuntimeError, match=expected_msg):
5353
vm.api.snapshot_load.put(
@@ -71,9 +71,9 @@ def test_unbinded_socket(uvm_plain, snapshot):
7171
jailed_sock_path = vm.create_jailed_resource(socket_path)
7272

7373
expected_msg = re.escape(
74-
"Load snapshot error: Failed to restore from snapshot: Failed to load guest "
75-
"memory: Error creating guest memory from uffd: Failed to connect to UDS Unix stream: "
76-
"Connection refused (os error 111)"
74+
"Load snapshot error: Failed to restore from snapshot: Failed to build microVM "
75+
"from snapshot: Failed to load guest memory: Error creating guest memory from uffd: "
76+
"Failed to connect to UDS Unix stream: Connection refused (os error 111)"
7777
)
7878
with pytest.raises(RuntimeError, match=expected_msg):
7979
vm.api.snapshot_load.put(

0 commit comments

Comments
 (0)