@@ -105,8 +105,9 @@ def command_calls(command):
105
105
@patch ('suse_migration_services.units.mount_system.is_mounted' )
106
106
@patch ('os.path.isfile' )
107
107
@patch ('os.path.exists' )
108
+ @patch ('os.makedirs' )
108
109
def test_main (
109
- self , mock_path_exists , mock_path_isfile , mock_is_mounted , mock_Fstab ,
110
+ self , mock_makedirs , mock_path_exists , mock_path_isfile , mock_is_mounted , mock_Fstab ,
110
111
mock_path_wipe , mock_Command_run , mock_update_migration_config_file ,
111
112
mock_get_migration_config_file ,
112
113
mock_get_system_migration_custom_config_file , mock_yaml_dump ,
@@ -203,7 +204,16 @@ def _is_mounted(path):
203
204
['mount' , '-t' , 'sysfs' , 'sysfs' , '/system-root/sys' ]
204
205
),
205
206
call (
206
- ['mount' , '-o' , 'bind' , '/run' , '/system-root/run' ]
207
+ [
208
+ 'mount' , '-o' , 'bind' , '/run/NetworkManager' ,
209
+ '/system-root/run/NetworkManager'
210
+ ]
211
+ ),
212
+ call (
213
+ [
214
+ 'mount' , '-o' , 'bind' , '/run/netconfig' ,
215
+ '/system-root/run/netconfig'
216
+ ]
207
217
)
208
218
]
209
219
assert fstab_mock .add_entry .call_args_list == [
@@ -253,6 +263,10 @@ def _is_mounted(path):
253
263
'sysfs' , '/system-root/sys'
254
264
)
255
265
]
266
+ assert mock_makedirs .call_args_list == [
267
+ call ('/system-root/run/NetworkManager' , exist_ok = True ),
268
+ call ('/system-root/run/netconfig' , exist_ok = True )
269
+ ]
256
270
fstab_mock .export .assert_called_once_with (
257
271
'/etc/system-root.fstab'
258
272
)
0 commit comments