From f5c6357c6da1fb947f6c1376352ab9264ff17a49 Mon Sep 17 00:00:00 2001 From: Huu Nguyen Date: Fri, 3 Mar 2017 11:54:16 -0800 Subject: [PATCH] Update s3_test to account for SkipVerify parameter Signed-off-by: Huu Nguyen --- registry/storage/driver/s3-aws/s3_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/registry/storage/driver/s3-aws/s3_test.go b/registry/storage/driver/s3-aws/s3_test.go index 363a22eb4..66ef6a307 100644 --- a/registry/storage/driver/s3-aws/s3_test.go +++ b/registry/storage/driver/s3-aws/s3_test.go @@ -31,6 +31,7 @@ func init() { encrypt := os.Getenv("S3_ENCRYPT") keyID := os.Getenv("S3_KEY_ID") secure := os.Getenv("S3_SECURE") + skipVerify := os.Getenv("S3_SKIP_VERIFY") v4Auth := os.Getenv("S3_V4_AUTH") region := os.Getenv("AWS_REGION") 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 if v4Auth != "" { v4Bool, err = strconv.ParseBool(v4Auth) @@ -76,6 +85,7 @@ func init() { encryptBool, keyID, secureBool, + skipVerifyBool, v4Bool, minChunkSize, defaultMultipartCopyChunkSize,