Record the behavior for missing disks in the backup.

Signed-off-by: Fiona Ebner <f.eb...@proxmox.com>
---
 test/restore-config-expected/140.conf | 17 +++++++++++++++++
 test/restore-config-input/140.conf    | 18 ++++++++++++++++++
 test/run_qemu_restore_config_tests.pl |  2 +-
 3 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 test/restore-config-expected/140.conf
 create mode 100644 test/restore-config-input/140.conf

diff --git a/test/restore-config-expected/140.conf 
b/test/restore-config-expected/140.conf
new file mode 100644
index 00000000..af1a4d59
--- /dev/null
+++ b/test/restore-config-expected/140.conf
@@ -0,0 +1,17 @@
+# missing disks in backup
+bios: seabios
+boot: order=scsi0;ide2;net0
+cores: 1
+efidisk0: mydir:140/vm-140-disk-0.qcow2,size=128K
+ide2: local:iso/debian-10.6.0-amd64-netinst.iso,media=cdrom
+memory: 2048
+name: eficloneclone
+net0: virtio=7A:6C:A5:8B:11:93,bridge=vmbr0,firewall=1
+numa: 0
+ostype: l26
+scsi0: target:140/vm-140-disk-0.raw,size=4G
+scsi1: rbdkvm:vm-140-disk-2,size=1G
+scsihw: virtio-scsi-pci
+smbios1: uuid=21a7e7bc-3cd2-4232-a009-a41f4ee992ae
+sockets: 1
+vmgenid: 0
diff --git a/test/restore-config-input/140.conf 
b/test/restore-config-input/140.conf
new file mode 100644
index 00000000..4a6e191c
--- /dev/null
+++ b/test/restore-config-input/140.conf
@@ -0,0 +1,18 @@
+# missing disks in backup
+bios: seabios
+boot: order=scsi0;ide2;net0
+cores: 1
+efidisk0: mydir:140/vm-140-disk-0.qcow2,size=128K
+ide2: local:iso/debian-10.6.0-amd64-netinst.iso,media=cdrom
+memory: 2048
+name: eficloneclone
+net0: virtio=7A:6C:A5:8B:11:93,bridge=vmbr0,firewall=1
+numa: 0
+ostype: l26
+scsi0: rbdkvm:vm-140-disk-1,size=4G
+scsi1: rbdkvm:vm-140-disk-2,size=1G
+scsihw: virtio-scsi-pci
+smbios1: uuid=21a7e7bc-3cd2-4232-a009-a41f4ee992ae
+sockets: 1
+vmgenid: 0
+#qmdump#map:scsi0:drive-scsi0:rbdkvm::
diff --git a/test/run_qemu_restore_config_tests.pl 
b/test/run_qemu_restore_config_tests.pl
index 231975c6..245258c8 100755
--- a/test/run_qemu_restore_config_tests.pl
+++ b/test/run_qemu_restore_config_tests.pl
@@ -25,7 +25,7 @@ $pve_cluster_module->mock(
 );
 
 # NOTE update when you add/remove tests
-plan tests => 4;
+plan tests => 5;
 
 my $cfs_mock = Test::MockModule->new("PVE::Cluster");
 $cfs_mock->mock(
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to