diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-02-02 09:32:00 -0500 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2017-02-02 09:32:00 -0500 |
commit | 701d1ab638b23c24877fc41824add66232446676 (patch) | |
tree | ec120c88d38ac9d38d9eabdd3270b52bb6ac9d96 /vendor/github.com/minio/minio-go/bucket-cache_test.go | |
parent | ca3211bc04f6dea34e8168217182637d1419f998 (diff) | |
download | chat-701d1ab638b23c24877fc41824add66232446676.tar.gz chat-701d1ab638b23c24877fc41824add66232446676.tar.bz2 chat-701d1ab638b23c24877fc41824add66232446676.zip |
Updating server dependancies (#5249)
Diffstat (limited to 'vendor/github.com/minio/minio-go/bucket-cache_test.go')
-rw-r--r-- | vendor/github.com/minio/minio-go/bucket-cache_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vendor/github.com/minio/minio-go/bucket-cache_test.go b/vendor/github.com/minio/minio-go/bucket-cache_test.go index 81cfbc097..0c068c966 100644 --- a/vendor/github.com/minio/minio-go/bucket-cache_test.go +++ b/vendor/github.com/minio/minio-go/bucket-cache_test.go @@ -26,6 +26,8 @@ import ( "path" "reflect" "testing" + + "github.com/minio/minio-go/pkg/s3signer" ) // Test validates `newBucketLocationCache`. @@ -70,14 +72,12 @@ func TestGetBucketLocationRequest(t *testing.T) { urlValues.Set("location", "") // Set get bucket location always as path style. - targetURL, err := url.Parse(c.endpointURL) - if err != nil { - return nil, err - } + targetURL := c.endpointURL targetURL.Path = path.Join(bucketName, "") + "/" targetURL.RawQuery = urlValues.Encode() // Get a new HTTP request for the method. + var err error req, err = http.NewRequest("GET", targetURL.String(), nil) if err != nil { return nil, err @@ -93,9 +93,9 @@ func TestGetBucketLocationRequest(t *testing.T) { // Sign the request. if c.signature.isV4() { - req = signV4(*req, c.accessKeyID, c.secretAccessKey, "us-east-1") + req = s3signer.SignV4(*req, c.accessKeyID, c.secretAccessKey, "us-east-1") } else if c.signature.isV2() { - req = signV2(*req, c.accessKeyID, c.secretAccessKey) + req = s3signer.SignV2(*req, c.accessKeyID, c.secretAccessKey) } return req, nil |