virshtest: Adapt 'virsh-snapshot' test

Invoke the majority of the command via DO_TEST_SCRIPT in 'virshtest'.
Some adaptation was needed to avoid printing of tables with volatile
data such as snapshot creation time, which were converted to list
names-only.

To proprely test redefinition we store XMLs rather than taking them from
the defined snapshots and use them separately to test redefinition of
snapshot XMLs. This makes use of the 'cd' command in non-interactive
mode.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa
2024-03-21 13:49:07 +01:00
parent eb82c632e3
commit c8d5703150
8 changed files with 337 additions and 234 deletions

View File

@@ -695,7 +695,6 @@ if conf.has('WITH_LIBVIRTD')
'virsh-read-bufsiz',
'virsh-read-non-seekable',
'virsh-self-test',
'virsh-snapshot',
'virsh-uriprecedence',
'virt-admin-self-test',
]