Project

General

Profile

action #132770

Updated by JERiveraMoya 10 months ago

#### Motivation 
 Improve recently created [tests/migration/patch_and_reboot_system.pm](https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/tests/migration/patch_and_reboot_system.pm) 

 Some points: 
 - `my ($self) = @_;` should be the first line to unpack parameters. 
 - Extract from `sub fully_patch_system ` the main part which is `$ret = zypper_call("$zypp_opt patch --with-interactive -l", exitcode => [0, 4, 102, 103], timeout => 6000);` with corresponding loop, comments and error handling in a new module, without including sle 11 sp4 or that invalid bug surrounded that code or not even the logic for hyperv. code. 
 - last `select_console` seems not make sense, next module should be responsible for that if needed. 

 #### Acceptance criteria 
 **AC1**: patch_and_reboot_system.pm is easy to read and an user could reproduce easily just reading the module what it does.

Back