virshtest: Adapt 'virsh-checkpoint' test
commit60cc7bd1c01f2885b103810e92ae839f0a3c5a67
authorPeter Krempa <pkrempa@redhat.com>
Thu, 21 Mar 2024 12:49:07 +0000 (21 13:49 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 2 Apr 2024 12:24:30 +0000 (2 14:24 +0200)
tree05ba835b12d3d421d47912426be88db07adc7ed3
parentc8d5703150df3b70a385b27a3e8c2d97ef19956e
virshtest: Adapt 'virsh-checkpoint' 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 checkpoint creation time, which were converted to list
names-only.

To proprely test redefinition we store XMLs rather than taking them from
the defined checkpoints and use them separately to test redefinition of
checkpoint 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-checkpoint [deleted file]
tests/virshtest.c
tests/virshtestdata/checkpoint-c2.xml [new file with mode: 0644]
tests/virshtestdata/checkpoint-c3.xml [new file with mode: 0644]
tests/virshtestdata/checkpoint-redefine.out [new file with mode: 0644]
tests/virshtestdata/checkpoint.in [new file with mode: 0755]
tests/virshtestdata/checkpoint.out [new file with mode: 0644]