tests: Update miscellaneous tests to use disk-create API.

Instead of calling out to qemu-img / truncate.
This commit is contained in:
Richard W.M. Jones
2014-01-28 15:06:39 +00:00
parent bd12e784e7
commit f02fddc26b
17 changed files with 45 additions and 56 deletions

View File

@@ -18,12 +18,10 @@
import os
import guestfs
f = open ("rhbz811650.img", "w")
f.truncate (500 * 1024 * 1024)
f.close ()
g = guestfs.GuestFS (python_return_dict=True)
g.disk_create ("rhbz811650.img", "raw", 500 * 1024 * 1024)
# Deliberate error: the disk format is supposed to be raw.
g.add_drive ("rhbz811650.img", format="qcow2");