mirror of
https://github.com/minio/minio.git
synced 2024-12-23 21:55:53 -05:00
ineffassign fixes (#2758)
This commit is contained in:
parent
f7430ec09c
commit
1148f95292
@ -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)
|
||||
}
|
||||
|
@ -108,6 +108,10 @@ func TestFSLoadFormatFS(t *testing.T) {
|
||||
defer removeAll(disk)
|
||||
|
||||
obj, err := newFSObjects(disk)
|
||||
if err != nil {
|
||||
t.Fatal("Should not fail here", err)
|
||||
}
|
||||
|
||||
fs := obj.(fsObjects)
|
||||
|
||||
// Regular format loading
|
||||
@ -137,6 +141,10 @@ func TestFSGetBucketInfo(t *testing.T) {
|
||||
defer removeAll(disk)
|
||||
|
||||
obj, err := newFSObjects(disk)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
fs := obj.(fsObjects)
|
||||
bucketName := "bucket"
|
||||
|
||||
|
@ -1463,6 +1463,8 @@ func (s *TestSuiteCommon) TestListObjectsHandler(c *C) {
|
||||
c.Assert(response.StatusCode, Equals, http.StatusOK)
|
||||
|
||||
getContent, err = ioutil.ReadAll(response.Body)
|
||||
c.Assert(err, IsNil)
|
||||
|
||||
c.Assert(strings.Contains(string(getContent), "<Key>bar</Key>"), Equals, true)
|
||||
c.Assert(strings.Contains(string(getContent), "<Owner><ID>minio</ID><DisplayName>minio</DisplayName></Owner>"), Equals, true)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user