Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip e2e tests that require node independent volume for the drivers that don't support node independent volumes #82678

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/e2e/storage/drivers/csi.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ func InitHostPathCSIDriver() testsuites.TestDriver {
testsuites.CapBlock: true,
testsuites.CapPVCDataSource: true,
testsuites.CapControllerExpansion: true,
testsuites.CapSingleNodeVolume: true,
}
return initHostPathCSIDriver("csi-hostpath",
capabilities,
Expand Down Expand Up @@ -345,7 +346,7 @@ func (m *mockCSIDriver) PrepareTest(f *framework.Framework) (*testsuites.PerTest
// InitHostPathV0CSIDriver returns a variant of hostpathCSIDriver with different manifests.
func InitHostPathV0CSIDriver() testsuites.TestDriver {
return initHostPathCSIDriver("csi-hostpath-v0",
map[testsuites.Capability]bool{testsuites.CapPersistence: true, testsuites.CapMultiPODs: true},
map[testsuites.Capability]bool{testsuites.CapPersistence: true, testsuites.CapMultiPODs: true, testsuites.CapSingleNodeVolume: true},
nil, /* no volume attributes -> no ephemeral volume testing */
// Using the current set of rbac.yaml files is problematic here because they don't
// match the version of the rules that were written for the releases of external-attacher
Expand Down
35 changes: 20 additions & 15 deletions test/e2e/storage/drivers/in_tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -701,8 +701,9 @@ func InitHostPathDriver() testsuites.TestDriver {
"", // Default fsType
),
Capabilities: map[testsuites.Capability]bool{
testsuites.CapPersistence: true,
testsuites.CapMultiPODs: true,
testsuites.CapPersistence: true,
testsuites.CapMultiPODs: true,
testsuites.CapSingleNodeVolume: true,
},
},
}
Expand Down Expand Up @@ -775,8 +776,9 @@ func InitHostPathSymlinkDriver() testsuites.TestDriver {
"", // Default fsType
),
Capabilities: map[testsuites.Capability]bool{
testsuites.CapPersistence: true,
testsuites.CapMultiPODs: true,
testsuites.CapPersistence: true,
testsuites.CapMultiPODs: true,
testsuites.CapSingleNodeVolume: true,
},
},
}
Expand Down Expand Up @@ -917,7 +919,8 @@ func InitEmptydirDriver() testsuites.TestDriver {
"", // Default fsType
),
Capabilities: map[testsuites.Capability]bool{
testsuites.CapExec: true,
testsuites.CapExec: true,
testsuites.CapSingleNodeVolume: true,
},
},
}
Expand Down Expand Up @@ -1677,19 +1680,21 @@ type localVolume struct {
var (
// capabilities
defaultLocalVolumeCapabilities = map[testsuites.Capability]bool{
testsuites.CapPersistence: true,
testsuites.CapFsGroup: true,
testsuites.CapBlock: false,
testsuites.CapExec: true,
testsuites.CapMultiPODs: true,
testsuites.CapPersistence: true,
testsuites.CapFsGroup: true,
testsuites.CapBlock: false,
testsuites.CapExec: true,
testsuites.CapMultiPODs: true,
testsuites.CapSingleNodeVolume: true,
}
localVolumeCapabitilies = map[utils.LocalVolumeType]map[testsuites.Capability]bool{
utils.LocalVolumeBlock: {
testsuites.CapPersistence: true,
testsuites.CapFsGroup: true,
testsuites.CapBlock: true,
testsuites.CapExec: true,
testsuites.CapMultiPODs: true,
testsuites.CapPersistence: true,
testsuites.CapFsGroup: true,
testsuites.CapBlock: true,
testsuites.CapExec: true,
testsuites.CapMultiPODs: true,
testsuites.CapSingleNodeVolume: true,
},
}
// fstype
Expand Down
6 changes: 6 additions & 0 deletions test/e2e/storage/testsuites/multivolume.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ func (t *multiVolumeTestSuite) defineTests(driver TestDriver, pattern testpatter
defer cleanup()

// Check different-node test requirement
if l.driver.GetDriverInfo().Capabilities[CapSingleNodeVolume] {
framework.Skipf("Driver %s only supports %v -- skipping", l.driver.GetDriverInfo().Name, CapSingleNodeVolume)
}
nodes := framework.GetReadySchedulableNodesOrDie(l.cs)
if len(nodes.Items) < 2 {
framework.Skipf("Number of available nodes is less than 2 - skipping")
Expand Down Expand Up @@ -241,6 +244,9 @@ func (t *multiVolumeTestSuite) defineTests(driver TestDriver, pattern testpatter
defer cleanup()

// Check different-node test requirement
if l.driver.GetDriverInfo().Capabilities[CapSingleNodeVolume] {
framework.Skipf("Driver %s only supports %v -- skipping", l.driver.GetDriverInfo().Name, CapSingleNodeVolume)
}
nodes := framework.GetReadySchedulableNodesOrDie(l.cs)
if len(nodes.Items) < 2 {
framework.Skipf("Number of available nodes is less than 2 - skipping")
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/storage/testsuites/testdriver.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ const (
CapRWX Capability = "RWX" // support ReadWriteMany access modes
CapControllerExpansion Capability = "controllerExpansion" // support volume expansion for controller
CapNodeExpansion Capability = "nodeExpansion" // support volume expansion for node
CapVolumeLimits = "volumeLimits" // support volume limits (can be *very* slow)
CapVolumeLimits Capability = "volumeLimits" // support volume limits (can be *very* slow)
CapSingleNodeVolume Capability = "singleNodeVolume" // support volume that can run on single node (like hostpath)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That can only run on a single node, right?

A network-attached storage system also provides volumes that "can run on a single node"...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct

)

// DriverInfo represents static information about a TestDriver.
Expand Down