mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-11 12:46:49 +00:00
test: the suite runs with manage.py test --parallel
Django clones a SQLite test database by copying its main file, while migrate's writes were still in the WAL file, so every clone had no tables. The project test runner writes the WAL back before cloning. Its pool workers are no longer daemonic, so the operations process tests can start their own workers. tblib carries the traceback of a failure out of a worker instead of ending the run. The suite takes 35 s on 8 CPUs instead of 133 s. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
aa720e09e8
commit
8e23138ef7
4 changed files with 45 additions and 1 deletions
|
|
@ -695,7 +695,7 @@ python manage.py test # all tests, including vrtManager
|
|||
ruff check .
|
||||
```
|
||||
|
||||
Each app keeps its tests in a `tests/` package, so `python manage.py test instances` runs one app. The suite includes mocked regression tests and disk/clone tests on libvirt's in-process `test:///default` driver. Set `WEBVIRTCLOUD_DB_HOST` (and the other `WEBVIRTCLOUD_DB_*` variables) to run it against PostgreSQL, as CI does.
|
||||
Each app keeps its tests in a `tests/` package, so `python manage.py test instances` runs one app; `--parallel` spreads the tests over the CPUs. The suite includes mocked regression tests and disk/clone tests on libvirt's in-process `test:///default` driver. Set `WEBVIRTCLOUD_DB_HOST` (and the other `WEBVIRTCLOUD_DB_*` variables) to run it against PostgreSQL, as CI does.
|
||||
|
||||
The compute tests try a local libvirt and skip when none answers; the instance tests run only when `TEST_LIBVIRT_HOST` is set. A green result with skips does not establish live KVM compatibility. The instance tests create `wvc-test-*` VMs and a temporary `wvc-test` pool (`/var/lib/libvirt/wvc-test`), remove them afterwards, and fail if any other VM or volume on the host changed:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue