Revision 902eb29f test/py/ganeti.hypervisor_unittest.py

b/test/py/ganeti.hypervisor_unittest.py
57 57
    self.assertEqual(fn(["a"]), "a")
58 58
    self.assertEqual(fn(["a", "b"]), "a; b")
59 59

  
60
  def testGetLinuxNodeInfo(self):
61
    meminfo = testutils.TestDataFilename("proc_meminfo.txt")
62
    cpuinfo = testutils.TestDataFilename("proc_cpuinfo.txt")
63
    result = hv_base.BaseHypervisor.GetLinuxNodeInfo(meminfo, cpuinfo)
64

  
65
    self.assertEqual(result["memory_total"], 7686)
66
    self.assertEqual(result["memory_free"], 6272)
67
    self.assertEqual(result["memory_dom0"], 2722)
68
    self.assertEqual(result["cpu_total"], 4)
69
    self.assertEqual(result["cpu_nodes"], 1)
70
    self.assertEqual(result["cpu_sockets"], 1)
71

  
60 72

  
61 73
if __name__ == "__main__":
62 74
  testutils.GanetiTestProgram()

Also available in: Unified diff