diff --git a/test/e2e/storage/drivers/csi.go b/test/e2e/storage/drivers/csi.go index 68930456f19..9ceac036134 100644 --- a/test/e2e/storage/drivers/csi.go +++ b/test/e2e/storage/drivers/csi.go @@ -158,6 +158,7 @@ func InitHostPathCSIDriver() storageframework.TestDriver { storageframework.CapReadWriteOncePod: true, storageframework.CapMultiplePVsSameID: true, storageframework.CapFSResizeFromSourceNotSupported: true, + storageframework.CapGroupSnapshot: true, // This is needed for the // testsuites/volumelimits.go `should support volume limits` @@ -223,6 +224,12 @@ func (h *hostpathCSIDriver) GetVolumeAttributesClass(_ context.Context, config * }, }, config.Framework.Namespace.Name, "e2e-vac-hostpath") } +func (h *hostpathCSIDriver) GetVolumeGroupSnapshotClass(ctx context.Context, config *storageframework.PerTestConfig, parameters map[string]string) *unstructured.Unstructured { + snapshotter := config.GetUniqueDriverName() + ns := config.Framework.Namespace.Name + + return utils.GenerateVolumeGroupSnapshotClassSpec(snapshotter, parameters, ns) +} func (h *hostpathCSIDriver) PrepareTest(ctx context.Context, f *framework.Framework) *storageframework.PerTestConfig { // Create secondary namespace which will be used for creating driver diff --git a/test/e2e/storage/framework/testdriver.go b/test/e2e/storage/framework/testdriver.go index 20b7797c58f..80622c86d5b 100644 --- a/test/e2e/storage/framework/testdriver.go +++ b/test/e2e/storage/framework/testdriver.go @@ -165,6 +165,7 @@ const ( CapVolumeMountGroup Capability = "volumeMountGroup" // Driver has the VolumeMountGroup CSI node capability. Because this is a FSGroup feature, the fsGroup capability must also be set to true. CapExec Capability = "exec" // exec a file in the volume CapSnapshotDataSource Capability = "snapshotDataSource" // support populate data from snapshot + CapGroupSnapshot Capability = "groupSnapshot" // support group snapshot CapPVCDataSource Capability = "pvcDataSource" // support populate data from pvc // multiple pods on a node can use the same volume concurrently;