(t *testing.T, verSeq uint64, parentId uint64, child *proto.Dentry)
| 899 | } |
| 900 | |
| 901 | func testDeleteFile(t *testing.T, verSeq uint64, parentId uint64, child *proto.Dentry) { |
| 902 | t.Logf("testDeleteFile seq [%v]", verSeq) |
| 903 | fsmDentry := &Dentry{ |
| 904 | ParentId: parentId, |
| 905 | Name: child.Name, |
| 906 | Inode: child.Inode, |
| 907 | Type: child.Type, |
| 908 | multiSnap: NewDentrySnap(verSeq), |
| 909 | } |
| 910 | t.Logf("testDeleteFile seq [%v] %v dentry %v", verSeq, fsmDentry.getSeqFiled(), fsmDentry) |
| 911 | assert.True(t, nil != mp.fsmDeleteDentry(fsmDentry, false)) |
| 912 | |
| 913 | rino := &Inode{ |
| 914 | Inode: child.Inode, |
| 915 | Type: child.Type, |
| 916 | multiSnap: &InodeMultiSnap{ |
| 917 | verSeq: verSeq, |
| 918 | }, |
| 919 | } |
| 920 | rino.setVer(verSeq) |
| 921 | rspDelIno := mp.fsmUnlinkInode(rino, 0) |
| 922 | |
| 923 | assert.True(t, rspDelIno.Status == proto.OpOk || rspDelIno.Status == proto.OpNotExistErr) |
| 924 | if rspDelIno.Status != proto.OpOk && rspDelIno.Status != proto.OpNotExistErr { |
| 925 | t.Logf("testDelDirSnapshotVersion: rspDelino[%v] return st %v", rspDelIno, proto.ParseErrorCode(int32(rspDelIno.Status))) |
| 926 | panic(nil) |
| 927 | } |
| 928 | } |
| 929 | |
| 930 | func testDeleteDirTree(t *testing.T, parentId uint64, verSeq uint64) { |
| 931 | t.Logf("testDeleteDirTree parentId %v seq [%v]", parentId, verSeq) |
no test coverage detected