action #132770
closedcoordination #121864: [epic] Split and enhance test modules in migrations
Improve recently created patch_and_reboot_system.pm
0%
Description
Motivation¶
Improve recently created 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. - 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
Additional information¶
Refactored test suite are currently in this job group with names ending on *_split_patch_sle
.
Updated by tinawang123 over 1 year ago
- Status changed from Workable to In Progress
- Assignee set to tinawang123
Updated by tinawang123 over 1 year ago
One question:
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
At here, Do we need a new module for this? Or just a new function?
Updated by JERiveraMoya over 1 year ago
tinawang123 wrote:
One question:
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 moduleAt here, Do we need a new module for this? Or just a new function?
the problem with libraries is that hide a lot the logic for testing, so it is better to expose in the module, as that module is fresh new, you can modify it and include this extraction there.
Updated by tinawang123 over 1 year ago
JERiveraMoya wrote:
tinawang123 wrote:
One question:
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 moduleAt here, Do we need a new module for this? Or just a new function?
the problem with libraries is that hide a lot the logic for testing, so it is better to expose in the module, as that module is fresh new, you can modify it and include this extraction there.
You mean 'sub fully_patch_system' use one new module eg: named 'fully_patch_system.pm', then the module 'patch_and_reboot_system.pm' only do reboot job. Is it your requirement?
Updated by tinawang123 over 1 year ago
Updated by tinawang123 over 1 year ago
- Status changed from In Progress to Resolved