[Kimchi-devel] [PATCH][Kimchi 4/4] Update tests
Ramon Medeiros
ramonn at linux.vnet.ibm.com
Wed Mar 30 18:31:25 UTC 2016
>> +mock_iso = "/tmp/mock.iso"
> Please, use capitalized name, once it is not going to change
ok
>> DEFAULT_POOL = u'/plugins/kimchi/storagepools/default-pool'
>> @@ -53,6 +54,7 @@ def setUpModule():
>> .close()
>> - t = {'name': 'test_img_template', 'disks': [{
>> - 'base': '/tmp/mock.img', 'format': 'qcow2',
>> - 'pool': {'name': DEFAULT_POOL}, 'size': 1}]}
>> + os.system("qemu-img create -f qcow2 %s 10G" % '/tmp/mock.img')
> Actually I my previous review, I was concerned whether you are
> removing the file
> from the system or not. I mean, after run all tests, will
> "/tmp/mock.img" file exist ?
> It should not.
>
>> + t = {'name': 'test_img_template', 'source_media':
>> '/tmp/mock.img'}
>> req = json.dumps(t)
>> resp = self.request('/plugins/kimchi/templates', req, 'POST')
>> self.assertEquals(201, resp.status)
>> os.remove('/tmp/mock.img')
^^^
mock.img is removed here
>>
--
Ramon Nunes Medeiros
Kimchi Developer
Linux Technology Center Brazil
IBM Systems & Technology Group
Phone : +55 19 2132 7878
ramonn at br.ibm.com
More information about the Kimchi-devel
mailing list