Repository navigation
[tests] Add E2E coverage for VMDisk source.image and source.disk clone paths #3482
Description
Problem
VMDisk E2E coverage exercises only source.http. The source.image (golden-image clone) and source.disk (PVC clone) paths — both added in #2258 — have no automated coverage, so a regression in either clone path ships unnoticed.
Current state on main: hack/e2e-chainsaw/vminstance/vmdisk.yaml creates a single VMDisk from spec.source.http pointing at the upstream Ubuntu noble cloud image. Nothing in hack/e2e-chainsaw/ or hack/e2e-apps/ touches source.image or source.disk.
What is needed
Extend the vminstance chainsaw suite (or add a sibling vm-disk suite) with two cases:
source.image— create a VMDisk cloning thealpine-3.21golden image fromcozy-public(smallest image in the default collection), assert the DataVolume reachesSucceededand the PVC isBound.source.disk— create a base disk, wait for it to be ready, then clone it viasource.disk, assert the clone's DataVolume and PVC, and clean up both.
Neither case should depend on an external download: use the in-cluster golden image for the base disk so the test does not pull from cloud-images.ubuntu.com twice.
Why this is an issue and not the original PR
#2403 implemented exactly this as hack/e2e-apps/vm-disk.bats and was approved by Aleksei Sviridkin (@lexfrei) on 2026-04-16 after a review round (idempotent teardown, 30s HR waits, golden image instead of an external download). It then sat as a draft and never merged. In the meantime the per-app E2E suites migrated from bats in hack/e2e-apps/ to chainsaw in hack/e2e-chainsaw/ — vminstance.bats no longer exists — so the PR's implementation shape is obsolete even though the coverage gap it identified is not. Rather than rebase a three-month-old bats file onto a framework it no longer targets, the gap is tracked here and the work should be redone as chainsaw.
The reviewed bats implementation is preserved on branch tests/vm-disk-source-coverage and is worth reading for the assertion sequence and the review findings baked into it.
Activity
test(vminstance): cover VMDisk clones from an image and from a disk (c…