]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
tests: do not check for MED inventory if /sys/class/dmi not available
authorVincent Bernat <vincent@bernat.ch>
Thu, 12 Mar 2020 12:25:37 +0000 (13:25 +0100)
committerVincent Bernat <vincent@bernat.ch>
Thu, 12 Mar 2020 12:25:37 +0000 (13:25 +0100)
tests/integration/test_med.py

index c54131f92cf8c51c9c325f6f8c76e2835b6ac8b1..3f20e40ed86680cf09835565695fa4f1cd75b13d 100644 (file)
@@ -1,3 +1,4 @@
+import os
 import pytest
 import platform
 import time
@@ -36,6 +37,8 @@ class TestLldpMed(object):
                            'MDI/PD': 'yes',
                            'Inventory': 'yes'}
 
+    @pytest.mark.skipif(not os.path.isdir("/sys/class/dmi/id"),
+                        reason="/sys/class/dmi not available")
     def test_med_inventory(self, lldpd1, lldpd, lldpcli, namespaces,
                            replace_file):
         with namespaces(2):