Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.03 60 lines 2.5 kB view raw
1diff --git a/unitest.py b/unitest.py 2--- a/unitest.py 3+++ b/unitest.py 4@@ -59,6 +59,7 @@ class TestGlances(unittest.TestCase): 5 """The function is called *every time* before test_*.""" 6 print('\n' + '=' * 78) 7 8+ @unittest.skip("Requires access to /etc/mtab") 9 def test_000_update(self): 10 """Update stats (mandatory step for all the stats). 11 12@@ -87,6 +88,7 @@ class TestGlances(unittest.TestCase): 13 for plugin in plugins_to_check: 14 self.assertTrue(plugin in plugins_list) 15 16+ @unittest.skip("Fails on NixOS") 17 def test_002_system(self): 18 """Check SYSTEM plugin.""" 19 stats_to_check = ['hostname', 'os_name'] 20@@ -97,6 +99,7 @@ class TestGlances(unittest.TestCase): 21 self.assertTrue(stat in stats_grab, msg='Cannot find key: %s' % stat) 22 print('INFO: SYSTEM stats: %s' % stats_grab) 23 24+ @unittest.skip("Fails on NixOS") 25 def test_003_cpu(self): 26 """Check CPU plugin.""" 27 stats_to_check = ['system', 'user', 'idle'] 28@@ -110,7 +113,7 @@ class TestGlances(unittest.TestCase): 29 self.assertLessEqual(stats_grab[stat], 100) 30 print('INFO: CPU stats: %s' % stats_grab) 31 32- @unittest.skipIf(WINDOWS, "Load average not available on Windows") 33+ @unittest.skip("Fails on NixOS") 34 def test_004_load(self): 35 """Check LOAD plugin.""" 36 stats_to_check = ['cpucore', 'min1', 'min5', 'min15'] 37@@ -123,6 +126,7 @@ class TestGlances(unittest.TestCase): 38 self.assertGreaterEqual(stats_grab[stat], 0) 39 print('INFO: LOAD stats: %s' % stats_grab) 40 41+ @unittest.skip("Fails on NixOS") 42 def test_005_mem(self): 43 """Check MEM plugin.""" 44 stats_to_check = ['available', 'used', 'free', 'total'] 45@@ -135,6 +139,7 @@ class TestGlances(unittest.TestCase): 46 self.assertGreaterEqual(stats_grab[stat], 0) 47 print('INFO: MEM stats: %s' % stats_grab) 48 49+ @unittest.skip("Fails on NixOS") 50 def test_006_swap(self): 51 """Check MEMSWAP plugin.""" 52 stats_to_check = ['used', 'free', 'total'] 53@@ -191,6 +196,7 @@ class TestGlances(unittest.TestCase): 54 self.assertTrue(type(stats_grab) is list, msg='Folders stats is not a list') 55 print('INFO: Folders stats: %s' % stats_grab) 56 57+ @unittest.skip("Fails on NixOS (TODO)") 58 def test_012_ip(self): 59 """Check IP plugin.""" 60 print('INFO: [TEST_012] Check IP stats')