Move all remaining utility functions into exporter modules
ClosedPublic

Authored by adamwill on Jan 13 2017, 12:41 AM.

Details

Summary

This adds a couple of new exporter modules, renames main_common
to utils (this is a better name: openSUSE's main_common is
functions used in main.pm, utils is what they call their module
full of miscellaneous commonly-used functions), and moves a
bunch of utility functions that were previously needlessly
implemented as instance methods in base classes into the
exporter modules. That means we can get rid of all the annoying
$self-> syntax for calling them.

We get rid of fedorabase entirely, as it's no longer useful
for anything. Other base classes keep the 'standard' methods
(like post_fail_hook) and methods which actually need to be
methods (like root_console, whose behaviour is different in
anacondatest and installedtest).

Test Plan

Do a full test suite run and check everything lines
up. There should be no functional differences from before at all,
this is just a re-org.

Diff Detail

Repository
rOPENQATESTS os-autoinst-distri-fedora
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
adamwill retitled this revision from to Move all remaining utility functions into exporter modules.Jan 13 2017, 12:41 AM
adamwill updated this object.
adamwill edited the test plan for this revision. (Show Details)

Note, I haven't actually run this yet, I just wrote it. I'm sure it's fine though. ;) I'll flip staging onto this branch for the next compose and we'll see how that goes.

adamwill updated this revision to Diff 2751.Jan 13 2017, 4:08 PM

anaconda needs use utils as it uses type_safely

adamwill updated this revision to Diff 2752.Jan 13 2017, 4:53 PM

Add missing use anaconda to several tests

adamwill updated this revision to Diff 2754.Jan 15 2017, 6:55 PM

Rebase on top of the clone_host_file change

Code looks OK and seems to work on staging.

This revision is now accepted and ready to land.Jan 17 2017, 11:29 AM
This revision was automatically updated to reflect the committed changes.