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):
64
64
exec_file = test_microvm .fc_binary_path ,
65
65
)
66
66
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
+ ):
69
74
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 )
80
75
81
76
82
77
def test_exec_file_not_exist (uvm_plain , tmp_path ):
You can’t perform that action at this time.
0 commit comments