Skip to content
Permalink
Browse files

skip e2e tests that run on multi node cluster and require node indepe…

…ndent volume for the drivers that does not support node independent volumes, like hostpath

Signed-off-by: Mucahit Kurt <mucahitkurt@gmail.com>
  • Loading branch information
mucahitkurt authored and msau42 committed Sep 12, 2019
1 parent 967744a commit 6cd8aa8038ab9996b9c86a7dbd3ab8e4789c6d08
@@ -97,6 +97,7 @@ func InitHostPathCSIDriver() testsuites.TestDriver {
testsuites.CapBlock: true,
testsuites.CapPVCDataSource: true,
testsuites.CapControllerExpansion: true,
testsuites.CapSingleNodeVolume: true,
}
return initHostPathCSIDriver("csi-hostpath",
capabilities,
@@ -702,8 +702,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,
},
},
}
@@ -776,8 +777,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,
},
},
}
@@ -918,7 +920,8 @@ func InitEmptydirDriver() testsuites.TestDriver {
"", // Default fsType
),
Capabilities: map[testsuites.Capability]bool{
testsuites.CapExec: true,
testsuites.CapExec: true,
testsuites.CapSingleNodeVolume: true,
},
},
}
@@ -1666,19 +1669,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
@@ -162,6 +162,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")
@@ -242,6 +245,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")
@@ -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)
)

// DriverInfo represents static information about a TestDriver.

0 comments on commit 6cd8aa8

Please sign in to comment.
You can’t perform that action at this time.