File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed
tests/integration_tests/security Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -64,19 +64,14 @@ def test_empty_jailer_id(uvm_plain):
6464 exec_file = test_microvm .fc_binary_path ,
6565 )
6666
67- # pylint: disable=W0703
68- try :
67+ # If the exception is not thrown, it means that Firecracker was
68+ # started successfully, hence there's a bug in the code due to which
69+ # we can set an empty ID.
70+ with pytest .raises (
71+ ChildProcessError ,
72+ match = r"Jailer error: Invalid instance ID: Invalid len \(0\); the length must be between 1 and 64" ,
73+ ):
6974 test_microvm .spawn ()
70- # If the exception is not thrown, it means that Firecracker was
71- # started successfully, hence there's a bug in the code due to which
72- # we can set an empty ID.
73- assert False
74- except Exception as err :
75- expected_err = (
76- "Jailer error: Invalid instance ID: Invalid len (0);"
77- " the length must be between 1 and 64"
78- )
79- assert expected_err in str (err )
8075
8176
8277def test_exec_file_not_exist (uvm_plain , tmp_path ):
You can’t perform that action at this time.
0 commit comments