mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +00:00
Merge pull request #110473 from lzhecheng/disruptive-skip-ssh-not-working
Skip tests if SSH not working
This commit is contained in:
commit
cffc7a1391
@ -62,6 +62,7 @@ var _ = utils.SIGDescribe("GenericPersistentVolume[Disruptive]", func() {
|
|||||||
runTest: utils.TestVolumeUnmountsFromForceDeletedPod,
|
runTest: utils.TestVolumeUnmountsFromForceDeletedPod,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
ginkgo.Context("When kubelet restarts", func() {
|
ginkgo.Context("When kubelet restarts", func() {
|
||||||
// Test table housing the ginkgo.It() title string and test spec. runTest is type testBody, defined at
|
// Test table housing the ginkgo.It() title string and test spec. runTest is type testBody, defined at
|
||||||
// the start of this file. To add tests, define a function mirroring the testBody signature and assign
|
// the start of this file. To add tests, define a function mirroring the testBody signature and assign
|
||||||
@ -79,6 +80,7 @@ var _ = utils.SIGDescribe("GenericPersistentVolume[Disruptive]", func() {
|
|||||||
for _, test := range disruptiveTestTable {
|
for _, test := range disruptiveTestTable {
|
||||||
func(t disruptiveTest) {
|
func(t disruptiveTest) {
|
||||||
ginkgo.It(t.testItStmt, func(ctx context.Context) {
|
ginkgo.It(t.testItStmt, func(ctx context.Context) {
|
||||||
|
e2eskipper.SkipUnlessSSHKeyPresent()
|
||||||
ginkgo.By("Executing Spec")
|
ginkgo.By("Executing Spec")
|
||||||
t.runTest(c, f, clientPod, e2epod.VolumeMountPath1)
|
t.runTest(c, f, clientPod, e2epod.VolumeMountPath1)
|
||||||
})
|
})
|
||||||
|
@ -272,6 +272,7 @@ var _ = utils.SIGDescribe("NFSPersistentVolumes[Disruptive][Flaky]", func() {
|
|||||||
for _, test := range disruptiveTestTable {
|
for _, test := range disruptiveTestTable {
|
||||||
func(t disruptiveTest) {
|
func(t disruptiveTest) {
|
||||||
ginkgo.It(t.testItStmt, func(ctx context.Context) {
|
ginkgo.It(t.testItStmt, func(ctx context.Context) {
|
||||||
|
e2eskipper.SkipUnlessSSHKeyPresent()
|
||||||
ginkgo.By("Executing Spec")
|
ginkgo.By("Executing Spec")
|
||||||
t.runTest(c, f, clientPod, e2epod.VolumeMountPath1)
|
t.runTest(c, f, clientPod, e2epod.VolumeMountPath1)
|
||||||
})
|
})
|
||||||
|
@ -71,6 +71,7 @@ func (s *disruptiveTestSuite) SkipUnsupportedTests(driver storageframework.TestD
|
|||||||
if pattern.VolMode == v1.PersistentVolumeBlock && !driver.GetDriverInfo().Capabilities[storageframework.CapBlock] {
|
if pattern.VolMode == v1.PersistentVolumeBlock && !driver.GetDriverInfo().Capabilities[storageframework.CapBlock] {
|
||||||
e2eskipper.Skipf("Driver %s doesn't support %v -- skipping", driver.GetDriverInfo().Name, pattern.VolMode)
|
e2eskipper.Skipf("Driver %s doesn't support %v -- skipping", driver.GetDriverInfo().Name, pattern.VolMode)
|
||||||
}
|
}
|
||||||
|
e2eskipper.SkipUnlessSSHKeyPresent()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *disruptiveTestSuite) DefineTests(driver storageframework.TestDriver, pattern storageframework.TestPattern) {
|
func (s *disruptiveTestSuite) DefineTests(driver storageframework.TestDriver, pattern storageframework.TestPattern) {
|
||||||
|
@ -339,6 +339,7 @@ func (s *subPathTestSuite) DefineTests(driver storageframework.TestDriver, patte
|
|||||||
})
|
})
|
||||||
|
|
||||||
ginkgo.It("should unmount if pod is gracefully deleted while kubelet is down [Disruptive][Slow][LinuxOnly]", func(ctx context.Context) {
|
ginkgo.It("should unmount if pod is gracefully deleted while kubelet is down [Disruptive][Slow][LinuxOnly]", func(ctx context.Context) {
|
||||||
|
e2eskipper.SkipUnlessSSHKeyPresent()
|
||||||
init()
|
init()
|
||||||
ginkgo.DeferCleanup(cleanup)
|
ginkgo.DeferCleanup(cleanup)
|
||||||
|
|
||||||
@ -351,6 +352,7 @@ func (s *subPathTestSuite) DefineTests(driver storageframework.TestDriver, patte
|
|||||||
})
|
})
|
||||||
|
|
||||||
ginkgo.It("should unmount if pod is force deleted while kubelet is down [Disruptive][Slow][LinuxOnly]", func(ctx context.Context) {
|
ginkgo.It("should unmount if pod is force deleted while kubelet is down [Disruptive][Slow][LinuxOnly]", func(ctx context.Context) {
|
||||||
|
e2eskipper.SkipUnlessSSHKeyPresent()
|
||||||
init()
|
init()
|
||||||
ginkgo.DeferCleanup(cleanup)
|
ginkgo.DeferCleanup(cleanup)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user