5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-11 05:17:57 +03:00
qemu-server/test
Fabian Ebner 48831384b8 create test environment for migration
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>
2020-12-15 15:21:37 +01:00
..
cfg2cmd config_to_command: use -no-shutdown option 2020-11-05 11:22:47 +01:00
MigrationTest create test environment for migration 2020-12-15 15:21:37 +01:00
ovf_manifests test: add test for OVF with missing default rasd namespace 2020-04-27 13:09:51 +02:00
snapshot-expected add new tests for 'runningmachine' and rollback 2018-09-17 15:49:31 +02:00
snapshot-input add new tests for 'runningmachine' and rollback 2018-09-17 15:49:31 +02:00
Makefile create test environment for migration 2020-12-15 15:21:37 +01:00
run_config2command_tests.pl tests: do not use for-loop for globs 2020-10-19 15:32:31 +02:00
run_ovf_tests.pl test: add test for OVF with missing default rasd namespace 2020-04-27 13:09:51 +02:00
run_pci_addr_checks.pl move qemu-configs to own directory 2019-09-24 18:59:35 +02:00
run_qemu_img_convert_tests.pl grammar fix: s/does not exists/does not exist/g 2019-12-13 12:20:56 +01:00
run_qemu_migrate_tests.pl create test environment for migration 2020-12-15 15:21:37 +01:00
run_snapshot_tests.pl tests: exit with -1 in case of failures 2017-05-17 13:58:18 +02:00
snapshot-test.pm tests: make module truthy 2020-10-19 15:33:16 +02:00
test_get_replicatable_volumes.pl grammar fix: s/does not exists/does not exist/g 2019-12-13 12:20:56 +01:00
test.vmdk fix #2395: refactor qemu_img_convert to accept files as source 2019-10-17 13:57:21 +02:00