mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
cephfs: log clone progress
log cephfs clone progress report during cephfs clone operation Signed-off-by: Nikhil-Ladha <nikhilladha1999@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
00d252e4ac
commit
98cf0780e1
@ -28,11 +28,11 @@ import (
|
||||
func TestCloneStateToError(t *testing.T) {
|
||||
t.Parallel()
|
||||
errorState := make(map[cephFSCloneState]error)
|
||||
errorState[cephFSCloneState{fsa.CloneComplete, "", ""}] = nil
|
||||
errorState[CephFSCloneError] = cerrors.ErrInvalidClone
|
||||
errorState[cephFSCloneState{fsa.CloneInProgress, "", ""}] = cerrors.ErrCloneInProgress
|
||||
errorState[cephFSCloneState{fsa.ClonePending, "", ""}] = cerrors.ErrClonePending
|
||||
errorState[cephFSCloneState{fsa.CloneFailed, "", ""}] = cerrors.ErrCloneFailed
|
||||
errorState[cephFSCloneState{fsa.CloneComplete, fsa.CloneProgressReport{}, "", ""}] = nil
|
||||
errorState[*CephFSCloneError] = cerrors.ErrInvalidClone
|
||||
errorState[cephFSCloneState{fsa.CloneInProgress, fsa.CloneProgressReport{}, "", ""}] = cerrors.ErrCloneInProgress
|
||||
errorState[cephFSCloneState{fsa.ClonePending, fsa.CloneProgressReport{}, "", ""}] = cerrors.ErrClonePending
|
||||
errorState[cephFSCloneState{fsa.CloneFailed, fsa.CloneProgressReport{}, "", ""}] = cerrors.ErrCloneFailed
|
||||
|
||||
for state, err := range errorState {
|
||||
require.ErrorIs(t, state.ToError(), err)
|
||||
|
Reference in New Issue
Block a user