Refactors MakeSecPods function

This commit is contained in:
Somtochi Onyekwere
2020-02-17 00:27:40 +01:00
parent 562a420d86
commit ee41c6b1a4
10 changed files with 205 additions and 82 deletions

View File

@@ -21,7 +21,7 @@ import (
"fmt"
"time"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/version"
"k8s.io/kubernetes/test/e2e/framework"
@@ -95,7 +95,12 @@ func (t *VolumeModeDowngradeTest) Setup(f *framework.Framework) {
framework.ExpectNoError(err)
ginkgo.By("Consuming the PVC before downgrade")
t.pod, err = e2epod.CreateSecPod(cs, ns, []*v1.PersistentVolumeClaim{t.pvc}, nil, false, "", false, false, e2epv.SELinuxLabel, nil, framework.PodStartTimeout)
podConfig := e2epod.Config{
NS: ns,
PVCs: []*v1.PersistentVolumeClaim{t.pvc},
SeLinuxLabel: e2epv.SELinuxLabel,
}
t.pod, err = e2epod.CreateSecPod(cs, &podConfig, framework.PodStartTimeout)
framework.ExpectNoError(err)
ginkgo.By("Checking if PV exists as expected volume mode")