5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-06 13:17:56 +03:00
Commit Graph

13 Commits

Author SHA1 Message Date
Dominik Csapak
8b158859bd use OVF from Storage
and delete it here (incl tests; they live in pve-storage now).

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-11-18 18:55:54 +01:00
Fiona Ebner
a7547a7c9f tests: fix invoking migration tests with make
Even if between single quotes, the dollar sign needs to be escaped
here. Otherwise, there will be an error
> Search pattern not terminated at -e line 1.
and no migration tests would be run. The error did not lead to
aborting though, making it harder to notice.

Fixes: aac89f6c ("tests: avoid calling test script to get target names")
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-05-22 15:51:58 +02:00
Thomas Lamprecht
aac89f6cfa tests: avoid calling test script to get target names
As otherwise we couple *all* Makefile targets to the dependencies of
the test script, even for a simple make call (e.g., done on building
the source), so use a much simpler heuristic that just depends on
perl, which is essential in Debian.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-19 15:06:46 +02:00
Fabian Ebner
c62d7cf547 test: add tests for restoring config
Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-04-18 18:10:28 +02:00
Thomas Lamprecht
0435f8798c buildsys: clean: remove migration test runtime files
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-12 12:01:41 +01:00
Fabian Ebner
0494299f57 tests: allow running migration tests in parallel
It's not easily possible to use separate JSON files for the test configuration,
because part of it is generated with perl code. While this could be encoded too,
it seems cleaner to use the "run a single test by specifing the name"
functionality while adding a way for make to obtain a list of the test names.

Each test has (and needs) its own directory now, meaning the log files do not
need to be renamed anymore.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-12-18 17:47:27 +01:00
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
Dominik Csapak
458a2b2640 add tests for qemu_img_convert
Add tests for the qemu_img_convert parameters to the resulting
'qemu-img convert' call

we mock the 'run_command' and extract the 'cmd' parameter to
compare with what we expect

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-10-17 13:57:21 +02:00
Thomas Lamprecht
d7d698f60c pci: add conflict tests
best viewed with: git show -w

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-06 19:27:30 +02:00
Thomas Lamprecht
7b963e5762 add config to command tests
To have a better safety net for not introducing regressions and also
some functional checks as the QEMU command defines the layout
behavior of the VM.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-12-11 10:44:04 +01:00
Emmanuel Kasper
5fd0910be3 Add tests for parse_ovf function
This includes:
 * a test script
 * the manifests generated by exports from a VmWare Workstation
 *  disk images are generated from qemu-img, with a 2KB size
(it is possible to inspect the disk images with od -bc
they contain a VMDK header and the rest are null characters)
2017-09-25 13:31:55 +02:00
Dietmar Maurer
3097a06bca add regression tests for get_replicatable_volumes 2017-06-14 07:02:43 +02:00
Fabian Grünbichler
a157d0fd17 Add regression tests for snapshotting
these are modelled after the existing snapshot tests for LXC
and should serve as a baseline for refactoring the Qemu
snapshot code using PVE::AbstractConfig
2016-03-04 11:23:23 +01:00