From 5e79a6d66e869b99fe56b5e308b04711c9fd6b3e Mon Sep 17 00:00:00 2001 From: "guozhi.li" Date: Thu, 18 Jan 2024 15:07:10 +0800 Subject: [PATCH] ut --- pkg/policy/bucket-policy_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pkg/policy/bucket-policy_test.go b/pkg/policy/bucket-policy_test.go index 3c7f938fc..3d10fcee0 100644 --- a/pkg/policy/bucket-policy_test.go +++ b/pkg/policy/bucket-policy_test.go @@ -235,6 +235,26 @@ func TestUnmarshalBucketPolicy(t *testing.T) { } } }] +}`, shouldSucceed: true}, + // Test 11 + {policyData: `{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Deny", + "Principal": "*", + "Action": "s3:PutObject", + "Resource": [ + "arn:aws:s3:::DOC-EXAMPLE-BUCKET1", + "arn:aws:s3:::DOC-EXAMPLE-BUCKET1/*" + ], + "Condition": { + "NumericLessThan": { + "s3:TlsVersion": 1.2 + } + } + } + ] }`, shouldSucceed: true}, }