Esempio n. 1
0
File: tests.py Progetto: herlo/tunir
 def test_download_initrd_kernel(self, s_call):
     """
     Tests the initrd and kernel extraction.
     """
     create_initrd_kernel()
     result= testvm.download_initrd_and_kernel('/tmp/test_tunir/test.qcow2', '/tmp/test_tunir')
     self.assertEqual(result['kernel'], '/tmp/test_tunir/test-vmlinuz')
     self.assertEqual(result['initrd'], '/tmp/test_tunir/test-initramfs')
Esempio n. 2
0
File: tests.py Progetto: herlo/tunir
 def test_download_initrd_kernel_exception(self, s_call):
     """
     Tests the initrd and kernel extraction.
     """
     testvm.clean_dirs('/tmp/test_tunir')
     create_initrd_kernel(missing=True)
     with captured_output() as (out, err):
         result= testvm.download_initrd_and_kernel('/tmp/test_tunir/test.qcow2', '/tmp/test_tunir')
     self.assertIn("Unable to find kernel or initrd, did they download?", out.getvalue())