mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-04-28 18:58:27 +00:00
test: qemu img convert: add test cases for snapshots
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com> Tested-by: Wolfgang Bumiller <w.bumiller@proxmox.com> Reviewed-by: Wolfgang Bumiller <w.bumiller@proxmox.com> Link: https://lore.proxmox.com/20250404133204.239783-15-f.ebner@proxmox.com
This commit is contained in:
parent
98209f99a1
commit
2973783125
@ -194,6 +194,24 @@ my $tests = [
|
||||
"/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
|
||||
]
|
||||
},
|
||||
{
|
||||
name => "lvmsnapshot",
|
||||
parameters => [ "local-lvm:vm-$vmid-disk-0", "local:$vmid/vm-$vmid-disk-0.raw", 1024*10, 'foo', 0, undef ],
|
||||
expected => [
|
||||
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "raw", "-O", "raw",
|
||||
"/dev/pve/snap_vm-$vmid-disk-0_foo",
|
||||
"/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
|
||||
]
|
||||
},
|
||||
{
|
||||
name => "qcow2snapshot",
|
||||
parameters => [ "local:$vmid/vm-$vmid-disk-0.qcow2", "local:$vmid/vm-$vmid-disk-0.raw", 1024*10, 'snap', 0, undef ],
|
||||
expected => [
|
||||
"/usr/bin/qemu-img", "convert", "-p", "-n", "-l", "snapshot.name=snap", "-f", "qcow2", "-O", "raw",
|
||||
"/var/lib/vz/images/$vmid/vm-$vmid-disk-0.qcow2",
|
||||
"/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
|
||||
]
|
||||
},
|
||||
];
|
||||
|
||||
my $command;
|
||||
|
Loading…
Reference in New Issue
Block a user