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
+3 -1
View File
@@ -26,6 +26,8 @@ import (
"net/http/httptest"
"testing"
"time"
humanize "github.com/dustin/go-humanize"
)
const (
@@ -264,7 +266,7 @@ func testPostPolicyHandler(obj ObjectLayer, instanceType string, t TestErrHandle
// Failed with entity too large.
{
objectName: "test",
data: bytes.Repeat([]byte("a"), 1024*1024+1),
data: bytes.Repeat([]byte("a"), (1*humanize.MiByte)+1),
expectedRespStatus: http.StatusBadRequest,
accessKey: credentials.AccessKeyID,
secretKey: credentials.SecretAccessKey,