CSI Snapshot Tests Now Run in Velero's kind E2E Job

Krishna Tupe
November 20, 2026

Velero’s end-to-end suite now runs its CSI volume snapshot cases on a kind cluster in CI. Seven matrix rows cover CSI snapshots, the data mover, VolumeGroupSnapshot, Kibishii snapshot and file system backup, namespace mapping, backup storage location deletion, and backup deletion with file system backup. Until recently that job ran none of them.

This is Velero’s only automated end-to-end coverage, and it runs on every pull request that touches Go code. So a change that breaks the CSI backup path, the data mover or VolumeGroupSnapshot is now caught before it merges, against a real CSI driver taking real VolumeSnapshot objects, on free GitHub-hosted runners.

Getting there was my LFX Mentorship project with the Velero community, tracked in issue #7507. What follows is what had been switching those tests off, and three adjacent things the work turned up that are worth knowing if you maintain a test suite of your own.

Why they did not run before

Two separate things kept those cases off, and only one of them was visible in Velero’s test code.

The first was that the kind job never installed a snapshot stack. The backup-volume-info cases, which cover CSI snapshots, the data mover and VolumeGroupSnapshot, do not use Kibishii and carry no kind guard. They never ran because the cluster had no CSI driver, no snapshot controller and no VolumeSnapshotClass to run them against, so no CI job selected them.

The second was harder to see. Eight provider checks across six test files skipped the Kibishii-backed snapshot cases on kind, each carrying a comment that said the same thing: volume snapshots and file system backups are not supported on kind. The oldest of those checks dates to 2021. Not one of them is obviously wrong, which is why all eight survived.

kind can take CSI snapshots. csi-driver-host-path installs into a kind cluster and takes real VolumeSnapshot objects. For the Kibishii cases, the real cause was in a different repository altogether.

Velero’s suite uses Kibishii as its sample workload. The suite installs the StorageClass named by its --storage-class-file flag, but Kibishii’s kustomize overlay ships a class of its own and points its PersistentVolumeClaims at that one instead. On kind, the overlay declared it like this:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: kibishii-storage-class
provisioner: rancher.io/local-path
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer

So every PersistentVolume Kibishii created was a hostPath volume, whatever the suite had installed. Velero declines to act on those twice over. The CSI backup action returns early unless the volume has a CSI source (pkg/backup/actions/csi/pvc_action.go). The file system backup path reads the PersistentVolume, finds a HostPath source, and skips it too (pkg/podvolume/backupper.go).

Skipping produced the right outcome for the wrong reason. There was genuinely nothing to snapshot, so the tests would have failed had they run. But the comments named kind, and the fix belonged in another repository: a new kind overlay whose StorageClass sits on a CSI driver. It was a believable wrong answer, too: kind does ship a local-path provisioner that cannot snapshot, so the explanation fit everything anyone could see from inside Velero.

Three things that hid in plain sight

Removing those two blockers was the small part. Finding out what else had quietly never run was the rest.

A label filter matches a bare token by equality. Velero selects test cases with Ginkgo label filters. Ginkgo compares a bare token like this:

if strings.ToLower(labels[i]) == expected {

So the filter CSISnapshot does not select a case labelled CSIVolumeGroupSnapshot. Substring intuition is wrong here, and I found that out on my own work: I had added a VolumeGroupSnapshot case a few days earlier, and the filter I was about to write for it would not have selected it. No CSI job existed yet, so nothing was lost, but nothing would have told me either.

A filter that selects nothing reports success. Ginkgo runs zero specs, prints SUCCESS! and exits 0. A label expression with a typo in it passes. The example command in the header of one of my own pull requests did exactly that, and it looked green. The suite now runs with --fail-on-empty, so an expression that matches nothing fails instead.

Tests can exist without ever being wired in. Velero’s unit test script listed pkg/ and internal/. It listed nothing under test/. Six test files already in the tree had never run, the oldest of them sitting there since July 2023.

What it took

Order mattered more than size. The kind cluster needed a snapshot stack before any CSI case could run, so a script that installs the snapshot controller and csi-driver-host-path came first, then a CI job that calls it. The StorageClass lived in another repository, so a CSI-backed overlay had to merge there next. Only then could Velero map the combination of kind and CSI onto that overlay and move its pinned Kibishii commit forward. Only then could the provider checks narrow from “kind” to “kind without CSI”, which is what they had always meant. Only then could the CI matrix select the cases.

Done in that order, each change was small and reviewable on its own.

Eight provider checks are now one. The case behind it needs a second cluster to migrate between, so it is still correctly skipped. The CSI matrix went from no rows to seven, and it is still growing: the most recent row landed while this post was in review.

Run it yourself

All of it runs locally with one command:

make -C test/ run-e2e-kind

The target creates a kind cluster and a MinIO container, builds and loads the Velero image, runs the suite, and removes what it created, including on a failure or an interrupt. The cluster’s kubeconfig goes to a temporary directory, so your current context is untouched. That target did not exist when this project started.

Add FEATURES=EnableCSI and it installs the snapshot stack and points Kibishii at the CSI-backed StorageClass, which is the path this post has been about. GINKGO_LABELS picks which cases run.

If you are changing anything in Velero’s backup or restore paths, that is now a way to see the CSI cases pass on your laptop before you open a pull request, and to see them pass again in CI after you do.

And if you maintain a Ginkgo suite of your own, the three above are worth checking in it: what your label filters actually select, whether a filter matching nothing fails, and whether every test file you have written sits in a package your CI runs.

Related Content
Velero 1.18: Concurrent Backups, Cache Volumes, and More
Velero Joins the CNCF Sandbox
Velero Joins the CNCF Sandbox
Velero has been accepted into the Cloud Native Computing Foundation as a Sandbox project, bringing Kubernetes-native backup and disaster recovery under vendor-neutral, community-driven governance.
Getting Started

To help you get started, see the documentation.