#!/usr/bin/env bash # The insert-a-disc helper, against scratch directories. # # ./tests/test_vm_insert_media.sh # # NEVER against the real library. Tests in this suite have damaged live # machines twice by sharing state with production, and this one is a # particularly easy way to do it: a staged file called `ubuntu.anything.iso` # lands in /var/lib/owuivm/iso matching `ubuntu*.iso`, and because the # rule is "newest wins" it would silently become the disc the next install # boots from. So every path is overridden and nothing real is touched. set -uo pipefail cd "$(dirname "$0")/.." HELPER=$(pwd)/vm/host/owuivm-insert-media FAILS=0 check() { # check