Skip to content

Commit 81433dd

Browse files
committed
add a few more tests for coverage
1 parent 2dd47bb commit 81433dd

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/cfnlint/data/schemas/other/iam/policy_resource.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"items": {
1010
"cfnLint": [
11-
"AWS::IAM::Policy/Properties/PolicyDocument/Statement/Resource"
11+
"AWS::IAM::Policy/Properties/PolicyDocument/Statement/Resource"
1212
],
1313
"type": "string"
1414
},

test/unit/rules/resources/iam/test_iam_permissions.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def rule():
180180
(
181181
"valid s3 bucket action",
182182
"s3:getobject",
183-
{"cfn_path": deque(["Resources", "AWS::IAM::ManagedPolicy", "Properties"])},
183+
{"cfn_path": deque(["Resources", "AWS::S3::BucketPolicy", "Properties"])},
184184
[],
185185
),
186186
(
@@ -189,6 +189,12 @@ def rule():
189189
{"cfn_path": deque(["Resources", "AWS::S3::BucketPolicy", "Properties"])},
190190
[ValidationError("'iam' is not one of ['s3']", rule=Permissions())],
191191
),
192+
(
193+
"invalid s3 bucket action bucket short path",
194+
"iam:tagrole",
195+
{"cfn_path": deque(["Resources"])},
196+
[],
197+
),
192198
(
193199
"invalid s3 bucket action",
194200
"iam:tagrole",

0 commit comments

Comments
 (0)