]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
domainbackupxml2xml: Add test case with unix socket server for pull mode backup
authorPeter Krempa <pkrempa@redhat.com>
Wed, 12 Mar 2025 12:48:27 +0000 (13:48 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 13 Mar 2025 14:36:46 +0000 (15:36 +0100)
While we show the example in the docs we don't have an example XML for
exercising the parser/formatter and schema.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/domainbackupxml2xmlin/backup-pull-unix.xml [new file with mode: 0644]
tests/domainbackupxml2xmlout/backup-pull-unix.xml [new file with mode: 0644]
tests/genericxml2xmltest.c

diff --git a/tests/domainbackupxml2xmlin/backup-pull-unix.xml b/tests/domainbackupxml2xmlin/backup-pull-unix.xml
new file mode 100644 (file)
index 0000000..cde9cea
--- /dev/null
@@ -0,0 +1,22 @@
+<domainbackup mode='pull'>
+  <incremental>1525889631</incremental>
+  <server transport='unix' socket='/path/to/server'/>
+  <disks>
+    <disk name='vda' type='file'>
+      <scratch file='/path/to/file'/>
+    </disk>
+    <disk name='hda' backup='no'/>
+    <disk name='vdc' type='file' backupmode='full'>
+      <scratch file='/path/to/file'/>
+    </disk>
+    <disk name='vdd' type='file' backupmode='incremental'>
+      <scratch file='/path/to/file'/>
+    </disk>
+    <disk name='vde' type='file' backupmode='incremental' incremental='blah'>
+      <scratch file='/path/to/file'/>
+    </disk>
+    <disk name='vdf' type='file' incremental='bleh'>
+      <scratch file='/path/to/file'/>
+    </disk>
+  </disks>
+</domainbackup>
diff --git a/tests/domainbackupxml2xmlout/backup-pull-unix.xml b/tests/domainbackupxml2xmlout/backup-pull-unix.xml
new file mode 100644 (file)
index 0000000..811edfd
--- /dev/null
@@ -0,0 +1,23 @@
+<domainbackup mode='pull'>
+  <incremental>1525889631</incremental>
+  <server transport='unix' socket='/path/to/server'/>
+  <disks>
+    <disk name='vda' backup='yes' type='file' backupmode='incremental' incremental='1525889631'>
+      <scratch file='/path/to/file'/>
+    </disk>
+    <disk name='hda' backup='no'/>
+    <disk name='vdc' backup='yes' type='file' backupmode='full'>
+      <scratch file='/path/to/file'/>
+    </disk>
+    <disk name='vdd' backup='yes' type='file' backupmode='incremental' incremental='1525889631'>
+      <scratch file='/path/to/file'/>
+    </disk>
+    <disk name='vde' backup='yes' type='file' backupmode='incremental' incremental='blah'>
+      <scratch file='/path/to/file'/>
+    </disk>
+    <disk name='vdf' backup='yes' type='file' backupmode='incremental' incremental='bleh'>
+      <scratch file='/path/to/file'/>
+    </disk>
+    <disk name='vdextradisk' backup='no'/>
+  </disks>
+</domainbackup>
index 61613d21f94c362ef53ec86050f0ca87aea69e17..b46b9515c3ae40b67345ab647eeceb3866693485 100644 (file)
@@ -244,6 +244,7 @@ mymain(void)
 
     DO_TEST_BACKUP("empty");
     DO_TEST_BACKUP("backup-pull");
+    DO_TEST_BACKUP("backup-pull-unix");
     DO_TEST_BACKUP("backup-pull-seclabel");
     DO_TEST_BACKUP("backup-pull-encrypted");
     DO_TEST_BACKUP("backup-push");