test.thing
A simple, modern VM runner.
Goals.
- one-file copypastelib
- easy to hook up to pytest
- future-oriented, built on systemd features in the guest (credentials, ssh-over-vsock, etc)
- might limit usefulness for testing older OSes but we can add workarounds as required
- works without networking configured in guest
- supporting the existing features of cockpit-bots
Host requirements
- Python 3.12, standard library
- qemu
- ssh
- systemd-ssh-proxy (available since systemd v256, polyfill available)
- vhost-device-vsock
Guest requirements
The guest should meet the requirements of the Virtual Machine Image API Specification.
There are polyfills for many of the require functionalities in workarounds/.
Try it
The easiest way to get test.thing is from PyPI:
test.thing.
If you want to depend on the package, please pin the version number exactly. It's early days and there is no guarantees about API (or even CLI) compatibility, even between micro releases. You can also simply copy testthing.py into your project.
For cli use, the easiest thing is to pip install test.thing which will put an
executable called tt in your path. This is sort of like the existing
cockpit-bots vm-run. If you want to test Cockpit images, you can do
something like:
tt \
-v \
-L 9091:127.0.0.1:9090 \
-s cockpit.socket \
bots/images/arch
An ssh control socket is created for sending commands and can also be used externally, avoiding the need to authenticate. A suggested ssh config:
Host tt.*
ControlPath ${XDG_RUNTIME_DIR}/test.thing/%h/ssh
And then you can say ssh tt.0 or scp file tt.0:/tmp.
You can also take a look at test/test_example.py and
run TEST_IMAGE=/path/to/image.qcow2 pytest. This was originally tested with
the examples images from
composefs-rs.
Metadata
Release files for test.thing 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| test_thing-0.4.0.tar.gz | 31.6 kB | Without provenance | Details for test_thing-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| test_thing-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for test_thing-0.4.0-py3-none-any.whl |
Total release size: 63.3 kB
Release files / test_thing-0.4.0.tar.gz
| Download URL | test_thing-0.4.0.tar.gz |
|---|---|
| Size | 31.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
37831a135ed47c0b2315ee8eef219c3333b9e980a80acf5d925dea16b199bfad
|
|
BLAKE2b-256 checksum How to use checksums |
121bc4a4ad1f2ed16235738743e1f220897788e298138d4302f2d900de5b0aa1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / test_thing-0.4.0-py3-none-any.whl
| Download URL | test_thing-0.4.0-py3-none-any.whl |
|---|---|
| Size | 31.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df6ec9e11d8e37622e548def2e28e9cb114d2c0cd735a93ebcac16ba479c6f86
|
|
BLAKE2b-256 checksum How to use checksums |
4ad926df77f33ab03d7e5a22b3271d5346e93e165aa2648b66fbb4eeba6cad30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for test.thing 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.