Exemple #1
0
 def test_danger(self, _, __):
     """Test computations around `df` output at disk danger level and tweaked limits"""
     disk = Disk().value
     self.assertTrue(all(i in disk for i in ['\x1b[0;33m', '861', '1024']))
Exemple #2
0
 def test(self, _, __):
     """Test computations around `df` output at disk normal level"""
     disk = Disk().value
     self.assertTrue(all(i in disk for i in ['\x1b[0;32m', '61', '1024']))
Exemple #3
0
 def test_warning(self, _, __):
     """Test computations around `df` output at disk warning level"""
     disk = Disk().value
     self.assertTrue(all(i in disk for i in ['\x1b[0;33m', '661', '1024']))
Exemple #4
0
 def test_df_only(self, _, __):
     """Test computations around `df` output at disk regular level"""
     disk = Disk().value
     self.assertTrue(
         all(i in disk
             for i in [str(Colors.GREEN_NORMAL), '45.9', '298.6']))
Exemple #5
0
 def test_df_only_warning(self, _, __):
     """Test computations around `df` output at disk warning level"""
     disk = Disk().value
     self.assertTrue(
         all(i in disk
             for i in [str(Colors.YELLOW_NORMAL), '251.6', '298.6']))
Exemple #6
0
 def test_no_recognised_disks(self, _, __):
     """Test df failing to detect any valid file-systems"""
     self.assertEqual(Disk().value, 'Not detected')
Exemple #7
0
 def test_df_failing(self, _, __):
     """Test df call failing against the BusyBox implementation"""
     self.assertEqual(Disk().value, 'Not detected')
Exemple #8
0
 def test_btrfs_only_with_raid_configuration(self, _, __):
     """Test computations around `btrfs` outputs with a RAID-1 setup"""
     disk = Disk().value
     self.assertTrue(
         all(i in disk
             for i in [str(Colors.GREEN_NORMAL), '943.4', '4202.5']))
Exemple #9
0
 def test_df_and_btrfs(self, _, __):
     """Test computations around `df` and `btrfs` outputs"""
     disk = Disk().value
     self.assertTrue(
         all(i in disk
             for i in [str(Colors.GREEN_NORMAL), '989.3', '4501.1']))
 def test(self, _):
     """Test computations around `df` output"""
     self.assertIn('61', Disk().value)
     self.assertIn('1024', Disk().value)