Update s3_test to account for SkipVerify parameter

Signed-off-by: Huu Nguyen <whoshuu@gmail.com>
This commit is contained in:
Huu Nguyen 2017-03-03 11:54:16 -08:00
parent 7655a3d91f
commit f5c6357c6d

View file

@ -31,6 +31,7 @@ func init() {
encrypt := os.Getenv("S3_ENCRYPT") encrypt := os.Getenv("S3_ENCRYPT")
keyID := os.Getenv("S3_KEY_ID") keyID := os.Getenv("S3_KEY_ID")
secure := os.Getenv("S3_SECURE") secure := os.Getenv("S3_SECURE")
skipVerify := os.Getenv("S3_SKIP_VERIFY")
v4Auth := os.Getenv("S3_V4_AUTH") v4Auth := os.Getenv("S3_V4_AUTH")
region := os.Getenv("AWS_REGION") region := os.Getenv("AWS_REGION")
objectACL := os.Getenv("S3_OBJECT_ACL") objectACL := os.Getenv("S3_OBJECT_ACL")
@ -59,6 +60,14 @@ func init() {
} }
} }
skipVerifyBool := false
if skipVerify != "" {
skipVerifyBool, err = strconv.ParseBool(skipVerify)
if err != nil {
return nil, err
}
}
v4Bool := true v4Bool := true
if v4Auth != "" { if v4Auth != "" {
v4Bool, err = strconv.ParseBool(v4Auth) v4Bool, err = strconv.ParseBool(v4Auth)
@ -76,6 +85,7 @@ func init() {
encryptBool, encryptBool,
keyID, keyID,
secureBool, secureBool,
skipVerifyBool,
v4Bool, v4Bool,
minChunkSize, minChunkSize,
defaultMultipartCopyChunkSize, defaultMultipartCopyChunkSize,