]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virshtest: Adapt 'virsh-snapshot' test
authorPeter Krempa <pkrempa@redhat.com>
Thu, 21 Mar 2024 12:49:07 +0000 (13:49 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 2 Apr 2024 12:24:30 +0000 (14:24 +0200)
commitc8d5703150df3b70a385b27a3e8c2d97ef19956e
tree79420ec04985fa41fd3dc59e8e560bc2944ec06c
parenteb82c632e3b39cf53c2df000020973ea77edbb83
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>
tests/meson.build
tests/virsh-snapshot [deleted file]
tests/virshtest.c
tests/virshtestdata/snapshot-redefine.out [new file with mode: 0644]
tests/virshtestdata/snapshot-s2.xml [new file with mode: 0644]
tests/virshtestdata/snapshot-s3.xml [new file with mode: 0644]
tests/virshtestdata/snapshot.in [new file with mode: 0755]
tests/virshtestdata/snapshot.out [new file with mode: 0644]