diff options
Diffstat (limited to 'tests/report_tests/plugin_tests')
-rw-r--r-- | tests/report_tests/plugin_tests/__init__.py | 0 | ||||
-rw-r--r-- | tests/report_tests/plugin_tests/networking.py | 31 |
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/report_tests/plugin_tests/__init__.py b/tests/report_tests/plugin_tests/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/tests/report_tests/plugin_tests/__init__.py diff --git a/tests/report_tests/plugin_tests/networking.py b/tests/report_tests/plugin_tests/networking.py new file mode 100644 index 00000000..f6cfa2d8 --- /dev/null +++ b/tests/report_tests/plugin_tests/networking.py @@ -0,0 +1,31 @@ +# This file is part of the sos project: https://github.com/sosreport/sos +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions of +# version 2 of the GNU General Public License. +# +# See the LICENSE file in the source distribution for further information. + + +from sos_tests import StageOneReportTest + + +class NetworkingPluginTest(StageOneReportTest): + """ + Basic tests to ensure proper collection from the networking plugins + + :avocado: tags=stageone + """ + + sos_cmd = '-o networking' + + def test_common_files_collected(self): + self.assertFileCollected('/etc/resolv.conf') + self.assertFileCollected('/etc/hosts') + + def test_ip_addr_symlink_created(self): + self.assertFileCollected('ip_addr') + + def test_forbidden_globs_skipped(self): + self.assertFileGlobNotInArchive('/proc/net/rpc/*/channel') + self.assertFileGlobNotInArchive('/proc/net/rpc/*/flush') |