diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2022-07-25 10:40:37 -0400 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2022-07-25 15:02:56 -0400 |
commit | 459741d204141970c3b9aa3fbe65f403d2027766 (patch) | |
tree | 3892b472a483981d93a88de327c1a515cb56354a | |
parent | 07c8846fde6fd60a0ab6eee032c9f036f8acc5e1 (diff) | |
download | sos-459741d204141970c3b9aa3fbe65f403d2027766.tar.gz |
[tests] Update networking test in suite
Adds a new test to the networking plugin test to ensure we iterate
correctly over network devices.
-rw-r--r-- | tests/report_tests/plugin_tests/networking.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/report_tests/plugin_tests/networking.py b/tests/report_tests/plugin_tests/networking.py index f6cfa2d8..4ae80a41 100644 --- a/tests/report_tests/plugin_tests/networking.py +++ b/tests/report_tests/plugin_tests/networking.py @@ -6,6 +6,7 @@ # # See the LICENSE file in the source distribution for further information. +import os from sos_tests import StageOneReportTest @@ -29,3 +30,9 @@ class NetworkingPluginTest(StageOneReportTest): def test_forbidden_globs_skipped(self): self.assertFileGlobNotInArchive('/proc/net/rpc/*/channel') self.assertFileGlobNotInArchive('/proc/net/rpc/*/flush') + + def test_netdevs_properly_iterated(self): + for dev in os.listdir('/sys/class/net'): + self.assertFileGlobInArchive( + "sos_commands/networking/ethtool_*_%s" % dev + ) |