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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 11
0
 def test_check_hardware_memory_is_string(self):
     ''' memory is string '''
     with self.assertRaises(cfy_exc.NonRecoverableError):
         server._check_hardware(1, 'memory')
Exemplo n.º 12
0
 def test_check_hardware_low_memory(self):
     ''' low memory == 10M '''
     with self.assertRaises(cfy_exc.NonRecoverableError):
         server._check_hardware(1, 10)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 15
0
 def test_check_hardware_without_cpu(self):
     ''' without cpu? '''
     with self.assertRaises(cfy_exc.NonRecoverableError):
         server._check_hardware(0, 10)
Exemplo n.º 16
0
 def test_check_hardware_empty(self):
     ''' nosing is set '''
     server._check_hardware(None, None)