Skip to content

Commit

Permalink
Make csi alpha failing test skip
Browse files Browse the repository at this point in the history
  • Loading branch information
mkimuram committed Nov 9, 2018
1 parent 06e7373 commit f98b87c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/e2e/storage/testsuites/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package testsuites

import (
"fmt"
"strings"
"time"

. "github.com/onsi/ginkgo"
Expand Down Expand Up @@ -324,3 +325,15 @@ func deleteStorageClass(cs clientset.Interface, className string) {
Expect(err).NotTo(HaveOccurred())
}
}

func skipTestUntilBugfix(issueID string, driverName string, prefixes []string) {
var needSkip bool
for _, prefix := range prefixes {
if strings.HasPrefix(driverName, prefix) {
needSkip = true
}
}
if needSkip {
framework.Skipf("Due to issue #%s, this test with %s doesn't pass, skipping until it fixes", issueID, driverName)
}
}
5 changes: 5 additions & 0 deletions test/e2e/storage/testsuites/volumemode.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func createVolumeModeTestInput(pattern testpatterns.TestPattern, resource volume
sc: resource.sc,
pvc: resource.pvc,
pv: resource.pv,
driverName: dInfo.Name,
testVolType: pattern.VolType,
nodeName: dInfo.Config.ClientNodeName,
volMode: pattern.VolMode,
Expand Down Expand Up @@ -233,6 +234,7 @@ type volumeModeTestInput struct {
sc *storagev1.StorageClass
pvc *v1.PersistentVolumeClaim
pv *v1.PersistentVolume
driverName string
testVolType testpatterns.TestVolType
nodeName string
volMode v1.PersistentVolumeMode
Expand Down Expand Up @@ -339,6 +341,9 @@ func testVolumeModeSuccessForDynamicPV(input *volumeModeTestInput) {
ns := f.Namespace
var err error

// TODO: This skip should be removed once #70760 is fixed
skipTestUntilBugfix("70760", input.driverName, []string{"csi-hostpath", "com.google.csi.gcepd"})

By("Creating sc")
input.sc, err = cs.StorageV1().StorageClasses().Create(input.sc)
Expect(err).NotTo(HaveOccurred())
Expand Down

0 comments on commit f98b87c

Please sign in to comment.