mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
tests: Update miscellaneous tests to use disk-create API.
Instead of calling out to qemu-img / truncate.
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user