@@ -62,6 +62,7 @@ def test_rescan_dev(test_microvm_with_ssh, network_config):
62
62
"""Verify that rescan works with a device-backed virtio device."""
63
63
test_microvm = test_microvm_with_ssh
64
64
test_microvm .spawn ()
65
+ session = test_microvm .api_session
65
66
66
67
# Set up the microVM with 1 vCPUs, 256 MiB of RAM, 0 network ifaces and
67
68
# a root file system with the rw permission. The network interface is
@@ -78,7 +79,7 @@ def test_rescan_dev(test_microvm_with_ssh, network_config):
78
79
is_root_device = False ,
79
80
is_read_only = False
80
81
)
81
- assert test_microvm . api_session .is_status_no_content (response .status_code )
82
+ assert session .is_status_no_content (response .status_code )
82
83
83
84
test_microvm .start ()
84
85
@@ -100,14 +101,13 @@ def test_rescan_dev(test_microvm_with_ssh, network_config):
100
101
drive_id = 'scratch' ,
101
102
path_on_host = test_microvm .create_jailed_resource (loopback_device ),
102
103
)
103
- assert test_microvm . api_session .is_status_no_content (response .status_code )
104
+ assert session .is_status_no_content (response .status_code )
104
105
105
106
_check_scratch_size (ssh_connection , fs2 .size ())
106
107
finally :
107
108
run (['losetup' , '-d' , loopback_device ], check = True )
108
109
109
110
110
-
111
111
def test_non_partuuid_boot (test_microvm_with_ssh , network_config ):
112
112
"""Test the output reported by blockdev when booting from /dev/vda."""
113
113
test_microvm = test_microvm_with_ssh
0 commit comments