mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 01:40:13 +00:00
e2e: test for node expand volume with secrets failed
Signed-off-by: zhucan <zhucan.k8s@gmail.com>
This commit is contained in:
parent
a5587de2e4
commit
80ff4b90a5
@ -836,8 +836,8 @@ func compareCSICalls(ctx context.Context, trackedCalls []string, expectedCallSeq
|
|||||||
|
|
||||||
// if the secret is not nil, compare it
|
// if the secret is not nil, compare it
|
||||||
if expectedCall.expectedSecret != nil {
|
if expectedCall.expectedSecret != nil {
|
||||||
if !reflect.DeepEqual(expectedCall.expectedSecret, c.Request.Secret) {
|
if !reflect.DeepEqual(expectedCall.expectedSecret, c.Request.Secrets) {
|
||||||
return allCalls, i, fmt.Errorf("Unexpected secret: expected %v, got %v", expectedCall.expectedSecret, c.Request.Secret)
|
return allCalls, i, fmt.Errorf("Unexpected secret: expected %v, got %v", expectedCall.expectedSecret, c.Request.Secrets)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,10 +311,9 @@ var _ = utils.SIGDescribe("CSI Mock volume expansion", func() {
|
|||||||
framework.ExpectNoError(err, "while waiting for PVC to finish")
|
framework.ExpectNoError(err, "while waiting for PVC to finish")
|
||||||
|
|
||||||
ginkgo.By("Waiting for all remaining expected CSI calls")
|
ginkgo.By("Waiting for all remaining expected CSI calls")
|
||||||
var allCalls []drivers.MockCSICall
|
|
||||||
err = wait.Poll(time.Second, csiResizeWaitPeriod, func() (done bool, err error) {
|
err = wait.Poll(time.Second, csiResizeWaitPeriod, func() (done bool, err error) {
|
||||||
var index int
|
var index int
|
||||||
allCalls, index, err = compareCSICalls(ctx, trackedCalls, test.expectedCalls, m.driver.GetCalls)
|
_, index, err = compareCSICalls(ctx, trackedCalls, test.expectedCalls, m.driver.GetCalls)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return true, err
|
return true, err
|
||||||
}
|
}
|
||||||
@ -328,7 +327,7 @@ var _ = utils.SIGDescribe("CSI Mock volume expansion", func() {
|
|||||||
}
|
}
|
||||||
return false, nil
|
return false, nil
|
||||||
})
|
})
|
||||||
framework.ExpectNoError(err, fmt.Sprintf("while waiting for all CSI calls: %s", allCalls))
|
framework.ExpectNoError(err, "while waiting for all CSI calls")
|
||||||
|
|
||||||
pvcConditions := pvc.Status.Conditions
|
pvcConditions := pvc.Status.Conditions
|
||||||
framework.ExpectEqual(len(pvcConditions), 0, "pvc should not have conditions")
|
framework.ExpectEqual(len(pvcConditions), 0, "pvc should not have conditions")
|
||||||
|
@ -379,7 +379,7 @@ type MockCSICall struct {
|
|||||||
Method string
|
Method string
|
||||||
Request struct {
|
Request struct {
|
||||||
VolumeContext map[string]string `json:"volume_context"`
|
VolumeContext map[string]string `json:"volume_context"`
|
||||||
Secret map[string]string `json:"secret"`
|
Secrets map[string]string `json:"secrets"`
|
||||||
}
|
}
|
||||||
FullError struct {
|
FullError struct {
|
||||||
Code codes.Code `json:"code"`
|
Code codes.Code `json:"code"`
|
||||||
|
Loading…
Reference in New Issue
Block a user