mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 10:20:51 +00:00
get pvc again to get the pv name that bound to the PVC
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
This commit is contained in:
parent
921dfed168
commit
2f71a635af
@ -201,7 +201,7 @@ var _ = utils.SIGDescribe("CSI Mock volume expansion", func() {
|
||||
})
|
||||
}
|
||||
})
|
||||
ginkgo.Context("CSI online volume expansion with secret[Feature:CSINodeExpandSecret]", func() {
|
||||
ginkgo.Context("CSI online volume expansion with secret", func() {
|
||||
var stringSecret = map[string]string{
|
||||
"username": "admin",
|
||||
"password": "t0p-Secret",
|
||||
@ -274,6 +274,11 @@ var _ = utils.SIGDescribe("CSI Mock volume expansion", func() {
|
||||
err = e2epod.WaitForPodNameRunningInNamespace(ctx, m.cs, pod.Name, pod.Namespace)
|
||||
framework.ExpectNoError(err, "Failed to start pod1: %v", err)
|
||||
|
||||
pvc, err = m.cs.CoreV1().PersistentVolumeClaims(pvc.Namespace).Get(ctx, pvc.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
framework.Failf("failed to get pvc %s, %v", pvc.Name, err)
|
||||
}
|
||||
gomega.Expect(pvc.Spec.VolumeName).ShouldNot(gomega.BeEquivalentTo(""), "while provisioning a volume for resizing")
|
||||
pv, err := m.cs.CoreV1().PersistentVolumes().Get(ctx, pvc.Spec.VolumeName, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
framework.Failf("failed to get pv %s, %v", pvc.Spec.VolumeName, err)
|
||||
|
Loading…
Reference in New Issue
Block a user