ineffassign fixes (#2758)

This commit is contained in:
Karthic Rao
2016-09-22 11:33:54 +05:30
committed by Harshavardhana
parent f7430ec09c
commit 1148f95292
3 changed files with 19 additions and 1 deletions
+9 -1
View File
@@ -71,12 +71,16 @@ func TestFSIsUploadExists(t *testing.T) {
fs := obj.(fsObjects)
var uploadID string
bucketName := "bucket"
objectName := "object"
obj.MakeBucket(bucketName)
uploadID, err := obj.NewMultipartUpload(bucketName, objectName, nil)
uploadID, err = obj.NewMultipartUpload(bucketName, objectName, nil)
if err != nil {
t.Fatal("Cannot create a new FS object: ", err)
}
// Test with valid upload id
if exists := fs.isUploadIDExists(bucketName, objectName, uploadID); !exists {
t.Fatal("Wrong result, expected: ", exists)
@@ -118,6 +122,10 @@ func TestFSWriteUploadJSON(t *testing.T) {
obj.MakeBucket(bucketName)
uploadID, err := obj.NewMultipartUpload(bucketName, objectName, nil)
if err != nil {
t.Fatal("Unexpected err: ", err)
}
if err := fs.writeUploadJSON(bucketName, objectName, uploadID, time.Now().UTC()); err != nil {
t.Fatal("Unexpected err: ", err)
}