Merge pull request #289 from zhucan/bugfix-268

Add event for snapshotting in progress
This commit is contained in:
Kubernetes Prow Robot
2020-04-30 03:56:17 -07:00
committed by GitHub
2 changed files with 4 additions and 1 deletions

View File

@@ -682,6 +682,9 @@ func (ctrl *csiSnapshotCommonController) createSnapshotContent(snapshot *crdv1.V
return nil, newControllerUpdateError(utils.SnapshotKey(snapshot), err.Error())
}
msg := fmt.Sprintf("Waiting for a snapshot %s to be created by the CSI driver.", utils.SnapshotKey(snapshot))
ctrl.eventRecorder.Event(snapshot, v1.EventTypeNormal, "CreatingSnapshot", msg)
// Update content in the cache store
_, err = ctrl.storeContentUpdate(updateContent)
if err != nil {

View File

@@ -206,7 +206,7 @@ func TestCreateSnapshotSync(t *testing.T) {
{"update", "volumesnapshots", errors.New("mock update error")},
{"update", "volumesnapshots", errors.New("mock update error")},
},
expectedEvents: []string{"Warning SnapshotStatusUpdateFailed"},
expectedEvents: []string{"Normal CreatingSnapshot"},
expectSuccess: false,
test: testSyncSnapshot,
},