def test_check_hardware(self):
     server._check_hardware(1, 512)
 def test_check_hardware_much_memory(self):
     ''' too much memory 1000G '''
     with self.assertRaises(cfy_exc.NonRecoverableError):
         server._check_hardware(1, 1024 * 1024)
 def test_check_hardware_memory_is_string(self):
     ''' memory is string '''
     with self.assertRaises(cfy_exc.NonRecoverableError):
         server._check_hardware(1, 'memory')
 def test_check_hardware_cpu_is_string(self):
     ''' cpu is string '''
     with self.assertRaises(cfy_exc.NonRecoverableError):
         server._check_hardware('not int', 10)
 def test_check_hardware_low_memory(self):
     ''' low memory == 10M '''
     with self.assertRaises(cfy_exc.NonRecoverableError):
         server._check_hardware(1, 10)
 def test_check_hardware_without_cpu(self):
     ''' without cpu? '''
     with self.assertRaises(cfy_exc.NonRecoverableError):
         server._check_hardware(0, 10)
 def test_check_hardware_much_cpu(self):
     ''' too mane cpu: 128 cpu? '''
     with self.assertRaises(cfy_exc.NonRecoverableError):
         server._check_hardware(128, 10)
Exemple #8
0
 def test_check_hardware(self):
     server._check_hardware(1, 512)
 def test_check_hardware_empty(self):
     ''' nosing is set '''
     server._check_hardware(None, None)
Exemple #10
0
 def test_check_hardware_much_memory(self):
     ''' too much memory 1000G '''
     with self.assertRaises(cfy_exc.NonRecoverableError):
         server._check_hardware(1, 1024 * 1024)
Exemple #11
0
 def test_check_hardware_memory_is_string(self):
     ''' memory is string '''
     with self.assertRaises(cfy_exc.NonRecoverableError):
         server._check_hardware(1, 'memory')
Exemple #12
0
 def test_check_hardware_low_memory(self):
     ''' low memory == 10M '''
     with self.assertRaises(cfy_exc.NonRecoverableError):
         server._check_hardware(1, 10)
Exemple #13
0
 def test_check_hardware_cpu_is_string(self):
     ''' cpu is string '''
     with self.assertRaises(cfy_exc.NonRecoverableError):
         server._check_hardware('not int', 10)
Exemple #14
0
 def test_check_hardware_much_cpu(self):
     ''' too mane cpu: 128 cpu? '''
     with self.assertRaises(cfy_exc.NonRecoverableError):
         server._check_hardware(128, 10)
Exemple #15
0
 def test_check_hardware_without_cpu(self):
     ''' without cpu? '''
     with self.assertRaises(cfy_exc.NonRecoverableError):
         server._check_hardware(0, 10)
Exemple #16
0
 def test_check_hardware_empty(self):
     ''' nosing is set '''
     server._check_hardware(None, None)