mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-01-11 05:17:57 +03:00
48831384b8
and the associated parts for 'qm start'. Each test will first populate the MigrationTest/run directory with the relevant configuration files and files keeping track of the state of everything necessary. Second, the mock-script for migration is executed, which in turn will execute the 'qm start' mock-script (if it's an online test that gets far enough). The scripts will simulate a migration and update the relevant files in the MigrationTest/run directory. Finally, the main test script will evaluate the state. The main checks are the volume IDs on the source and target and the VM configuration itself. Additional checks are the vm_status and expected_calls, keeping track if certain calls have been made. The rationale behind creating two mock-scripts is two-fold: 1. It removes the need to hard code responses for the tunnel and to recycle logic for determining and allocating migration volumes. Some of that logic already happens in the API part, so it was necessary to mock the whole CLI-Handler. 2. It allows testing the code relevant for migration in 'qm start' as well, and it should even be possible to test different versions of the mock-scripts against each other. With a bit of extra work and things like 'git worktree', it might even be possible to automate this. The helper get_patched config is useful to change pre-defined configuration files on the fly, avoiding the new to explicitly define whole configurations to test for something in many cases. Signed-off-by: Fabian Ebner <f.ebner@proxmox.com> |
||
---|---|---|
.. | ||
cfg2cmd | ||
MigrationTest | ||
ovf_manifests | ||
snapshot-expected | ||
snapshot-input | ||
Makefile | ||
run_config2command_tests.pl | ||
run_ovf_tests.pl | ||
run_pci_addr_checks.pl | ||
run_qemu_img_convert_tests.pl | ||
run_qemu_migrate_tests.pl | ||
run_snapshot_tests.pl | ||
snapshot-test.pm | ||
test_get_replicatable_volumes.pl | ||
test.vmdk |