os-autoinst-distri-opensuse
os-autoinst-distri-opensuse copied to clipboard
Optimize installation/add_update_test_repo
Handle optional screens and pop-ups while adding custom repository URLs based on needle matches instead of needlessly waiting for optional screens which will not show up.
- Related ticket: https://progress.opensuse.org/issues/112343
- Needles: N/A
- Verification run: https://openqa.suse.de/tests/9708069 (saved 4 minutes of add_update_test_repo run time compared to original job https://openqa.suse.de/tests/9704628)
Great PR! Please pay attention to the following items before merging:
Files matching lib/**.pm
:
- [ ] Consider adding or extending unit tests in t/
This is an automatically generated QA checklist based on modified files
Looks pretty complicated, isn't check_screen
with match_has_tag
doing the same ? e.g. https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/tests/installation/await_install.pm#L115
handle_screen()
has a few benefits over using match_has_tag()
directly:
- You don't have to make a long if/else code noodle to pick the right handler. If you have predefined handler functions elsewhere,
handle_screen()
needs just one line per handler. - You don't have to wrap the whole thing in a loop if you need to handle multiple optional screens.
- You can pass a partially constructed handler hash to another function that'll add more handlers and finish the task. For example this'll be useful for handling GPG key popups which need to be handled in multiple places during installation with different follow-up screens.
Please also document the return / exit behavior I think it's important part of the handler_map.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If it's still needed, you can add labels WIP
or notready
to it
Rebased on current master and updated verification run. This PR is ready for merge.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If it's still needed, you can add labels WIP
or notready
to it
Great PR! Please pay attention to the following items before merging:
Files matching lib/**.pm
:
- [ ] Consider adding or extending unit tests in t/
This is an automatically generated QA checklist based on modified files.
Rebased again. Verification runs updated. This PR has been ready for merge for 6 months already.