diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2021-05-18 14:10:41 -0400 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2021-06-30 16:34:26 -0400 |
commit | 0c92c0f0314bdefef599c55ccf28877a8c8215f5 (patch) | |
tree | 77368fb6ad7fc389df68a8acfdc3ba4e1af6aa4b /tests/unittests | |
parent | 757c9e4b6b5572e58f05aaa0952bcfef5b4e49bd (diff) | |
download | sos-0c92c0f0314bdefef599c55ccf28877a8c8215f5.tar.gz |
[utilities,Plugin] Add sysroot wrappers for common os.path methods
Adds wrapper methods to `sos.utilities` that allows the common `os`
methods, such as `os.path.exists()` to account for the setting of
`sysroot`. This will allow sos, and particularly plugins, to more
easily and reliably function as expected when sos is run within a
container.
Helpers have been added directly to `Plugin` that automatically pass the
set `sysroot` option, so plugin authors do not need to handle that
option or directly import these path functions from `sos.utilities`.
Closes: #494
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Diffstat (limited to 'tests/unittests')
-rw-r--r-- | tests/unittests/plugin_tests.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/unittests/plugin_tests.py b/tests/unittests/plugin_tests.py index dda8c13a..1d6ce73a 100644 --- a/tests/unittests/plugin_tests.py +++ b/tests/unittests/plugin_tests.py @@ -117,6 +117,7 @@ class MockOptions(object): no_postproc = False skip_files = [] skip_commands = [] + sysroot = None class PluginToolTests(unittest.TestCase): |