Skip to content

[tests] Add E2E coverage for VMDisk source.image and source.disk clone paths #3482

Closed

Description

@myasnikovdaniil

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 the alpine-3.21 golden image from cozy-public (smallest image in the default collection), assert the DataVolume reaches Succeeded and the PVC is Bound.
  • source.disk — create a base disk, wait for it to be ready, then clone it via source.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.

Follow-up to #2258. Supersedes #2403.

Activity

  1. added
    kind/featureCategorizes issue or PR as related to a new feature
    area/testingIssues or PRs related to testing (e2e, bats, unit tests)
    area/virtualizationIssues or PRs related to virtualization (kubevirt, cdi, vmi, vm-import)
    on Jul 29, 2026
  2. added
    triage/acceptedIndicates an issue is ready to be actively worked on
    priority/backlogGeneral backlog priority. Lower than priority/important-longterm
    and removed
    triage/needs-triageIndicates an issue needs triage by a maintainer
    on Sep 23, 2026
  3. added a commit that references this issue on Oct 5, 2026
    2188f16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/testingIssues or PRs related to testing (e2e, bats, unit tests)area/virtualizationIssues or PRs related to virtualization (kubevirt, cdi, vmi, vm-import)kind/featureCategorizes issue or PR as related to a new featurepriority/backlogGeneral backlog priority. Lower than priority/important-longtermtriage/acceptedIndicates an issue is ready to be actively worked on

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions