Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions test/e2e/storage/drivers/openshift_group_snapshot_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,30 +84,30 @@ var _ storageframework.SnapshottableTestDriver = &groupSnapshotHostpathCSIDriver
var _ storageframework.EphemeralTestDriver = &groupSnapshotHostpathCSIDriver{}

// InitgroupSnapshotHostpathCSIDriver returns groupSnapshotHostpathCSIDriver that implements TestDriver interface
func InitGroupSnapshotHostpathCSIDriver() storageframework.TestDriver {
func InitGroupSnapshotHostpathCSIDriver(name string) storageframework.TestDriver {
capabilities := map[storageframework.Capability]bool{
storageframework.CapPersistence: true,
storageframework.CapSnapshotDataSource: true,
storageframework.CapMultiPODs: true,
storageframework.CapBlock: true,
storageframework.CapPVCDataSource: true,
storageframework.CapControllerExpansion: true,
storageframework.CapOfflineExpansion: true,
storageframework.CapOnlineExpansion: true,
storageframework.CapSingleNodeVolume: true,
storageframework.CapMultiPODs: false,
storageframework.CapBlock: false,
storageframework.CapPVCDataSource: false,
storageframework.CapControllerExpansion: false,
storageframework.CapOfflineExpansion: false,
storageframework.CapOnlineExpansion: false,
storageframework.CapSingleNodeVolume: false,
storageframework.CapReadWriteOncePod: true,
storageframework.CapMultiplePVsSameID: true,
storageframework.CapMultiplePVsSameID: false,
storageframework.CapFSResizeFromSourceNotSupported: true,
storageframework.CapVolumeGroupSnapshot: true,

// This is needed for the
// testsuites/volumelimits.go `should support volume limits`
// test. --maxvolumespernode=10 gets
// added when patching the deployment.
storageframework.CapVolumeLimits: true,
storageframework.CapVolumeLimits: false,
}
// OCP specific code: a different driver name (csi-hostpath-groupsnapshot)
return initGroupSnapshotHostpathCSIDriver("csi-hostpath-groupsnapshot",
return initGroupSnapshotHostpathCSIDriver(name,
capabilities,
// Volume attributes don't matter, but we have to provide at least one map.
[]map[string]string{
Expand Down
19 changes: 12 additions & 7 deletions test/e2e/storage/openshift_csi_volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ limitations under the License.
package storage

import (
"fmt"

"k8s.io/kubernetes/test/e2e/framework"
"k8s.io/kubernetes/test/e2e/storage/drivers"
storageframework "k8s.io/kubernetes/test/e2e/storage/framework"
Expand All @@ -27,19 +29,22 @@ import (
)

// List of testDrivers to be executed in below loop
var ocpCSITestDrivers = []func() storageframework.TestDriver{
var ocpCSITestDrivers = []func(string) storageframework.TestDriver{
drivers.InitGroupSnapshotHostpathCSIDriver,
}

// This executes testSuites for csi volumes.
var _ = utils.SIGDescribe("OCP CSI Volumes", func() {
for _, initDriver := range ocpCSITestDrivers {
curDriver := initDriver()
for i := range 30 {
name := fmt.Sprintf("csi-hostpath-groupsnapshot-%d", i)
curDriver := initDriver(name)
args := storageframework.GetDriverNameWithFeatureTags(curDriver)
args = append(args, func() {
storageframework.DefineTestSuites(curDriver, testsuites.CSISuites)
})
framework.Context(args...)
}

args := storageframework.GetDriverNameWithFeatureTags(curDriver)
args = append(args, func() {
storageframework.DefineTestSuites(curDriver, testsuites.CSISuites)
})
framework.Context(args...)
}
})