Watch
0
0
Fork
You've already forked hyperhive
0

vm-tests: a k3s node harness, and the swarm images boot as pods

This commit is contained in:
atlas 2026-11-19 09:37:34 +01:00 • committed by maia
commit aaf11a0764

View file

@ -111,3 +111,12 @@ set one there and read it with `os.environ` in the script. `nix fmt` formats and
`ruff-format` and `ruff-check`, which fixes what it can), and the `formatting`
flake check fails on a file `nix fmt` would change. `nix/vm-tests/ruff.toml`
names the globals the test driver provides.
Tests that need a k8s cluster import `nix/vm-tests/lib/k3s-node.nix`, a
single-node k3s server that loads the image tarballs it's given and pulls
nothing, and start their script with the text of `nix/vm-tests/lib/k3s.py`,
which holds the helpers: wait for the node and the images, wait for a pod's
phase or readiness, read a container's state, fetch a pod's health endpoint,
and delete a pod while recording its exit and how long the delete took.
`k8s-swarm-images` boots the swarm daemons' images as pods on it. Run a k3s
test on its own, by name: the all-tests run can pass the one-hour job limit.