From 459741d204141970c3b9aa3fbe65f403d2027766 Mon Sep 17 00:00:00 2001 From: Jake Hunsaker Date: Mon, 25 Jul 2022 10:40:37 -0400 Subject: [tests] Update networking test in suite Adds a new test to the networking plugin test to ensure we iterate correctly over network devices. --- tests/report_tests/plugin_tests/networking.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') 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 + ) -- cgit