summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/minio/minio-go/functional_tests.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/minio/minio-go/functional_tests.go')
-rw-r--r--vendor/github.com/minio/minio-go/functional_tests.go19
1 files changed, 10 insertions, 9 deletions
diff --git a/vendor/github.com/minio/minio-go/functional_tests.go b/vendor/github.com/minio/minio-go/functional_tests.go
index e4ea9b647..207cbd03c 100644
--- a/vendor/github.com/minio/minio-go/functional_tests.go
+++ b/vendor/github.com/minio/minio-go/functional_tests.go
@@ -569,7 +569,7 @@ func testPutObjectReadAt() {
logError(testName, function, args, startTime, "", fmt.Sprintf("Number of bytes in stat does not match, expected %d got %d", bufSize, st.Size), err)
return
}
- if st.ContentType != objectContentType {
+ if st.ContentType != objectContentType && st.ContentType != "application/octet-stream" {
logError(testName, function, args, startTime, "", "Content types don't match", err)
return
}
@@ -683,7 +683,7 @@ func testPutObjectWithMetadata() {
logError(testName, function, args, startTime, "", "Number of bytes returned by PutObject does not match GetObject, expected "+string(bufSize)+" got "+string(st.Size), err)
return
}
- if st.ContentType != customContentType {
+ if st.ContentType != customContentType && st.ContentType != "application/octet-stream" {
logError(testName, function, args, startTime, "", "ContentType does not match, expected "+customContentType+" got "+st.ContentType, err)
return
}
@@ -751,7 +751,7 @@ func testPutObjectWithContentLanguage() {
data := bytes.Repeat([]byte("a"), int(0))
n, err := c.PutObject(bucketName, objectName, bytes.NewReader(data), int64(0), minio.PutObjectOptions{
- ContentLanguage: "en-US",
+ ContentLanguage: "en",
})
if err != nil {
logError(testName, function, args, startTime, "", "PutObject failed", err)
@@ -769,8 +769,8 @@ func testPutObjectWithContentLanguage() {
return
}
- if objInfo.Metadata.Get("Content-Language") != "en-US" {
- logError(testName, function, args, startTime, "", "Expected content-language 'en-US' doesn't match with StatObject return value", err)
+ if objInfo.Metadata.Get("Content-Language") != "en" {
+ logError(testName, function, args, startTime, "", "Expected content-language 'en' doesn't match with StatObject return value", err)
return
}
@@ -1359,7 +1359,7 @@ func testFPutObjectMultipart() {
logError(testName, function, args, startTime, "", "Number of bytes does not match, expected "+string(int64(totalSize))+" got "+string(objInfo.Size), err)
return
}
- if objInfo.ContentType != objectContentType {
+ if objInfo.ContentType != objectContentType && objInfo.ContentType != "application/octet-stream" {
logError(testName, function, args, startTime, "", "ContentType doesn't match", err)
return
}
@@ -1499,6 +1499,7 @@ func testFPutObject() {
// Perform FPutObject with no contentType provided (Expecting application/x-gtar)
args["objectName"] = objectName + "-GTar"
+ args["opts"] = minio.PutObjectOptions{}
n, err = c.FPutObject(bucketName, objectName+"-GTar", fName+".gtar", minio.PutObjectOptions{})
if err != nil {
logError(testName, function, args, startTime, "", "FPutObject failed", err)
@@ -1541,8 +1542,8 @@ func testFPutObject() {
logError(testName, function, args, startTime, "", "StatObject failed", err)
return
}
- if rGTar.ContentType != "application/x-gtar" {
- logError(testName, function, args, startTime, "", "ContentType does not match, expected application/x-gtar, got "+rGTar.ContentType, err)
+ if rGTar.ContentType != "application/x-gtar" && rGTar.ContentType != "application/octet-stream" {
+ logError(testName, function, args, startTime, "", "ContentType does not match, expected application/x-gtar or application/octet-stream, got "+rGTar.ContentType, err)
return
}
@@ -4535,7 +4536,7 @@ func testFPutObjectV2() {
logError(testName, function, args, startTime, "", "StatObject failed", err)
return
}
- if rGTar.ContentType != "application/x-gtar" {
+ if rGTar.ContentType != "application/x-gtar" && rGTar.ContentType != "application/octet-stream" {
logError(testName, function, args, startTime, "", "Content-Type headers mismatched, expected: application/x-gtar , got "+rGTar.ContentType, err)
return
}