[#611] Split name processing from object info creation procedure

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2022-07-22 19:54:11 +03:00 committed by Alex Vanin
parent 97f81d3270
commit e0136feb73
3 changed files with 51 additions and 71 deletions

View file

@ -72,7 +72,7 @@ func newTestInfo(obj oid.ID, bkt *data.BucketInfo, name string, isDir bool) *dat
return info
}
func Test_objectInfoFromMeta(t *testing.T) {
func Test_objectInfoName(t *testing.T) {
var uid user.ID
var id oid.ID
var containerID cid.ID
@ -158,7 +158,7 @@ func Test_objectInfoFromMeta(t *testing.T) {
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
info := objectInfoFromMeta(bkt, tc.object, tc.prefix, tc.delimiter)
info := processObjectInfoName(objectInfoFromMeta(bkt, tc.object), tc.prefix, tc.delimiter)
require.Equal(t, tc.result, info)
})
}