mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 02:41:25 +00:00
check node expand secret ref and fix CSI calls compare failure
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
This commit is contained in:
parent
2f71a635af
commit
40d543a59d
@ -286,6 +286,9 @@ var _ = utils.SIGDescribe("CSI Mock volume expansion", func() {
|
||||
if pv.Spec.CSI == nil || pv.Spec.CSI.NodeExpandSecretRef == nil {
|
||||
framework.Fail("creating pv without 'NodeExpandSecretRef'")
|
||||
}
|
||||
if pv.Spec.CSI.NodeExpandSecretRef.Namespace != f.Namespace.Name || pv.Spec.CSI.NodeExpandSecretRef.Name != secretName {
|
||||
framework.Failf("failed to set node expand secret ref, namespace: %s name: %s", pv.Spec.CSI.NodeExpandSecretRef.Namespace, pv.Spec.CSI.NodeExpandSecretRef.Name)
|
||||
}
|
||||
|
||||
ginkgo.By("Expanding current pvc")
|
||||
newSize := resource.MustParse("6Gi")
|
||||
@ -303,6 +306,10 @@ var _ = utils.SIGDescribe("CSI Mock volume expansion", func() {
|
||||
err = testsuites.WaitForControllerVolumeResize(ctx, pvc, m.cs, csiResizeWaitPeriod)
|
||||
framework.ExpectNoError(err, "While waiting for PV resize to finish")
|
||||
|
||||
ginkgo.By("Waiting for PVC resize to finish")
|
||||
pvc, err = testsuites.WaitForFSResize(ctx, pvc, m.cs)
|
||||
framework.ExpectNoError(err, "while waiting for PVC to finish")
|
||||
|
||||
ginkgo.By("Waiting for all remaining expected CSI calls")
|
||||
err = wait.Poll(time.Second, csiResizeWaitPeriod, func() (done bool, err error) {
|
||||
_, index, err := compareCSICalls(ctx, trackedCalls, test.expectedCalls, m.driver.GetCalls)
|
||||
@ -321,10 +328,6 @@ var _ = utils.SIGDescribe("CSI Mock volume expansion", func() {
|
||||
})
|
||||
framework.ExpectNoError(err, "while waiting for all CSI calls")
|
||||
|
||||
ginkgo.By("Waiting for PVC resize to finish")
|
||||
pvc, err = testsuites.WaitForFSResize(ctx, pvc, m.cs)
|
||||
framework.ExpectNoError(err, "while waiting for PVC to finish")
|
||||
|
||||
pvcConditions := pvc.Status.Conditions
|
||||
framework.ExpectEqual(len(pvcConditions), 0, "pvc should not have conditions")
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user