Use humanize constants for KiB, MiB and GiB units. (#3322)

This commit is contained in:
Bala FA
2016-11-22 18:18:22 -08:00
committed by Harshavardhana
parent c1ebcbcda2
commit 825000bc34
23 changed files with 170 additions and 135 deletions

View File

@@ -31,6 +31,8 @@ import (
"sync"
"time"
humanize "github.com/dustin/go-humanize"
. "gopkg.in/check.v1"
)
@@ -2367,7 +2369,7 @@ func (s *TestSuiteCommon) TestObjectValidMD5(c *C) {
// Create a byte array of 5MB.
// content for the object to be uploaded.
data := bytes.Repeat([]byte("0123456789abcdef"), 5*1024*1024/16)
data := bytes.Repeat([]byte("0123456789abcdef"), 5*humanize.MiByte/16)
// calculate md5Sum of the data.
md5SumBase64 := getMD5HashBase64(data)
@@ -2440,7 +2442,7 @@ func (s *TestSuiteCommon) TestObjectMultipart(c *C) {
// content for the part to be uploaded.
// Create a byte array of 5MB.
data := bytes.Repeat([]byte("0123456789abcdef"), 5*1024*1024/16)
data := bytes.Repeat([]byte("0123456789abcdef"), 5*humanize.MiByte/16)
// calculate md5Sum of the data.
md5SumBase64 := getMD5HashBase64(data)