mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
e2e: refine snapshot test
This addresses the two remaining change requests from https://github.com/kubernetes/kubernetes/pull/69036: - replace "csi-hostpath-v0" name check with capability check (cleaner that way) - add feature tag to "should create snapshot with defaults" because that is an alpha feature Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
This commit is contained in:
parent
f8536e8e42
commit
315266b25e
@ -80,6 +80,10 @@ func (s *snapshottableTestSuite) getTestSuiteInfo() TestSuiteInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *snapshottableTestSuite) skipUnsupportedTest(pattern testpatterns.TestPattern, driver TestDriver) {
|
func (s *snapshottableTestSuite) skipUnsupportedTest(pattern testpatterns.TestPattern, driver TestDriver) {
|
||||||
|
dInfo := driver.GetDriverInfo()
|
||||||
|
if !dInfo.Capabilities[CapDataSource] {
|
||||||
|
framework.Skipf("Driver %q does not support snapshots - skipping", dInfo.Name)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func createSnapshottableTestInput(driver TestDriver, pattern testpatterns.TestPattern) (snapshottableTestResource, snapshottableTestInput) {
|
func createSnapshottableTestInput(driver TestDriver, pattern testpatterns.TestPattern) (snapshottableTestResource, snapshottableTestInput) {
|
||||||
@ -187,10 +191,7 @@ type snapshottableTestInput struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func testSnapshot(input *snapshottableTestInput) {
|
func testSnapshot(input *snapshottableTestInput) {
|
||||||
It("should create snapshot with defaults", func() {
|
It("should create snapshot with defaults [Feature:VolumeSnapshotDataSource]", func() {
|
||||||
if input.dInfo.Name == "csi-hostpath-v0" {
|
|
||||||
framework.Skipf("skip test when using driver csi-hostpath-v0 - skipping")
|
|
||||||
}
|
|
||||||
TestCreateSnapshot(input.testCase, input.cs, input.dc, input.pvc, input.sc, input.vsc)
|
TestCreateSnapshot(input.testCase, input.cs, input.dc, input.pvc, input.sc, input.vsc)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user