e2e: provide an option to skip rbd and cephfs e2e

Added two new parameters for e2e test to skip
rbd and cephfs tests. This will help us to
run more test in Travis CI.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2020-07-08 17:16:31 +05:30 committed by mergify[bot]
parent 4e82384b43
commit 63b795d165
5 changed files with 18 additions and 0 deletions

View File

@ -78,6 +78,8 @@ are available while running tests:
| deploy-timeout | Timeout to wait for created kubernetes resources (default: 10 minutes) |
| deploy-cephfs | Deploy cephfs csi driver as part of E2E (default: true) |
| deploy-rbd | Deploy rbd csi driver as part of E2E (default: true) |
| test-cephfs | Test cephfs csi driver as part of E2E (default: true) |
| test-rbd | Test rbd csi driver as part of E2E (default: true) |
| cephcsi-namespace | The namespace in which cephcsi driver will be created (default: "default") |
| rook-namespace | The namespace in which rook operator is installed (default: "rook-ceph") |
| kubeconfig | Path to kubeconfig containing embedded authinfo (default: $HOME/.kube/config) |

View File

@ -115,6 +115,9 @@ var _ = Describe("cephfs", func() {
var c clientset.Interface
// deploy cephfs CSI
BeforeEach(func() {
if !testCephFS {
Skip("Skipping CephFS E2E")
}
c = f.ClientSet
if deployCephFS {
if cephCSINamespace != defaultNs {
@ -130,6 +133,9 @@ var _ = Describe("cephfs", func() {
})
AfterEach(func() {
if !testRBD {
Skip("Skipping CephFS E2E")
}
if CurrentGinkgoTestDescription().Failed {
// log pods created by helm chart
logsCSIPods("app=ceph-csi-cephfs", c)

View File

@ -20,6 +20,8 @@ func init() {
flag.IntVar(&deployTimeout, "deploy-timeout", 10, "timeout to wait for created kubernetes resources")
flag.BoolVar(&deployCephFS, "deploy-cephfs", true, "deploy cephfs csi driver")
flag.BoolVar(&deployRBD, "deploy-rbd", true, "deploy rbd csi driver")
flag.BoolVar(&testCephFS, "test-cephfs", true, "test cephfs csi driver")
flag.BoolVar(&testRBD, "test-rbd", true, "test rbd csi driver")
flag.StringVar(&cephCSINamespace, "cephcsi-namespace", defaultNs, "namespace in which cephcsi deployed")
flag.StringVar(&rookNamespace, "rook-namespace", "rook-ceph", "namespace in which rook is deployed")
setDefaultKubeconfig()

View File

@ -128,6 +128,9 @@ var _ = Describe("RBD", func() {
var c clientset.Interface
// deploy RBD CSI
BeforeEach(func() {
if !testRBD {
Skip("Skipping RBD E2E")
}
c = f.ClientSet
if deployRBD {
createNodeLabel(f, nodeRegionLabel, regionValue)
@ -147,6 +150,9 @@ var _ = Describe("RBD", func() {
})
AfterEach(func() {
if !testRBD {
Skip("Skipping RBD E2E")
}
if CurrentGinkgoTestDescription().Failed {
// log pods created by helm chart
logsCSIPods("app=ceph-csi-rbd", c)

View File

@ -52,6 +52,8 @@ var (
deployTimeout int
deployCephFS bool
deployRBD bool
testCephFS bool
testRBD bool
cephCSINamespace string
rookNamespace string
ns string