Skip to main content

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

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.

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)

Source distribution for test.thing 0.4.0
File Size Uploaded
test_thing-0.4.0.tar.gz 31.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for test.thing 0.4.0
File Interpreter ABI Platform
test_thing-0.4.0-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page