Merge pull request #146 from masterSplinter01/145-fix-tests
Fix util tests
This commit is contained in:
commit
50ece712b4
2 changed files with 6 additions and 1 deletions
|
@ -127,6 +127,7 @@ func objectInfoFromMeta(bkt *BucketInfo, meta *object.Object, prefix, delimiter
|
|||
index := strings.Index(tail, delimiter)
|
||||
if index >= 0 {
|
||||
isDir = true
|
||||
mimeType = ""
|
||||
filename = prefix + tail[:index+1]
|
||||
userHeaders = nil
|
||||
} else {
|
||||
|
|
|
@ -28,12 +28,16 @@ func newTestObject(oid *object.ID, bkt *BucketInfo, name string) *object.Object
|
|||
created.SetKey(object.AttributeTimestamp)
|
||||
created.SetValue(strconv.FormatInt(defaultTestCreated.Unix(), 10))
|
||||
|
||||
contentType := object.NewAttribute()
|
||||
contentType.SetKey(object.AttributeContentType)
|
||||
contentType.SetValue(defaultTestContentType)
|
||||
|
||||
raw := object.NewRaw()
|
||||
raw.SetID(oid)
|
||||
raw.SetOwnerID(bkt.Owner)
|
||||
raw.SetContainerID(bkt.CID)
|
||||
raw.SetPayload(defaultTestPayload)
|
||||
raw.SetAttributes(filename, created)
|
||||
raw.SetAttributes(filename, created, contentType)
|
||||
raw.SetPayloadSize(uint64(defaultTestPayloadLength))
|
||||
|
||||
return raw.Object()
|
||||
|
|
Loading…
Reference in a new issue