libvirt/tests/virshtestdata/checkpoint.in
Peter Krempa 60cc7bd1c0 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>
2024-04-02 14:24:30 +02:00

36 lines
1.2 KiB
Plaintext
Executable File

echo Create a series of checkpoints, with names that intentionally sort
echo differently by topology than by name. For now, it is not possible
echo to create fanout without hacking through redefines.
checkpoint-create-as test c1
checkpoint-create-as test c1
checkpoint-create-as test c3
checkpoint-create-as test c2
echo snapshots cannot be created while checkpoints exist
snapshot-create-as test s1
echo Checking tree view (siblings sorted alphabetically)
checkpoint-list test --tree
echo Demonstrate list filtering
checkpoint-list test --roots --name
checkpoint-list test --leaves --name
checkpoint-list test --parent --no-leaves --name
checkpoint-list test --from c3 --name
checkpoint-list test --from c1 --descendants --name
echo Now the tree is linear, so we have an unambiguous topological order
checkpoint-list test --name
checkpoint-list test --name --topological
echo validate XML
checkpoint-delete test c1
checkpoint-dumpxml test c3
checkpoint-dumpxml test c2
echo Deleting current checkpoint moves current up to remaining parent
checkpoint-delete test --children-only c3
checkpoint-list test --leaves --name
checkpoint-delete test --children c3
checkpoint-list test --leaves --name