Skip to content

Commit

Permalink
add tests for policies fxns
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Dec 7, 2023
1 parent 89bc157 commit 6c8bf39
Show file tree
Hide file tree
Showing 5 changed files with 1,123 additions and 0 deletions.
103 changes: 103 additions & 0 deletions tests/fixtures/aws_policy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
http_interactions:
- request:
method: post
uri: https://iam.amazonaws.com/
body:
encoding: ''
string: Action=GetPolicy&PolicyArn=arn%3Aaws%3Aiam%3A%3Aaws%3Apolicy%2FReadOnlyAccess&Version=2010-05-08
headers:
User-Agent: paws/0.6.1 (R4.3.2; darwin20; aarch64)
Accept: application/xml
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Content-Length: '96'
X-Amz-Date: 20231206T212911Z
Authorization: redacted
response:
status:
status_code: 200
category: Success
reason: OK
message: 'Success: (200) OK'
headers:
x-amzn-requestid: 5646fb2e-81e2-4756-b008-e70c5b55ef6d
content-type: text/xml
content-length: '848'
date: Wed, 06 Dec 2023 21:29:11 GMT
body:
encoding: ''
file: no
string: |
<GetPolicyResponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/">
<GetPolicyResult>
<Policy>
<PermissionsBoundaryUsageCount>0</PermissionsBoundaryUsageCount>
<Path>/</Path>
<UpdateDate>2023-12-01T17:23:47Z</UpdateDate>
<DefaultVersionId>v108</DefaultVersionId>
<PolicyId>ANPAILL3HVNFSB6DCOWYQ</PolicyId>
<IsAttachable>true</IsAttachable>
<PolicyName>ReadOnlyAccess</PolicyName>
<Description>Provides read-only access to AWS services and resources.</Description>
<AttachmentCount>0</AttachmentCount>
<Arn>arn:aws:iam::aws:policy/ReadOnlyAccess</Arn>
<CreateDate>2015-02-06T18:39:48Z</CreateDate>
<Tags/>
</Policy>
</GetPolicyResult>
<ResponseMetadata>
<RequestId>5646fb2e-81e2-4756-b008-e70c5b55ef6d</RequestId>
</ResponseMetadata>
</GetPolicyResponse>
recorded_at: 2023-12-06 21:29:12 GMT
recorded_with: vcr/1.2.2, webmockr/0.9.0
- request:
method: post
uri: https://iam.amazonaws.com/
body:
encoding: ''
string: Action=GetPolicy&PolicyArn=arn%3Aaws%3Aiam%3A%3Aaws%3Apolicy%2FReadOnlyAccess&Version=2010-05-08
headers:
User-Agent: paws/0.6.1 (R4.3.2; darwin20; aarch64)
Accept: application/xml
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Content-Length: '96'
X-Amz-Date: 20231206T212911Z
Authorization: redacted
response:
status:
status_code: 200
category: Success
reason: OK
message: 'Success: (200) OK'
headers:
x-amzn-requestid: 781aa2aa-b3b5-4c07-aacf-4291496c7510
content-type: text/xml
content-length: '848'
date: Wed, 06 Dec 2023 21:29:11 GMT
body:
encoding: ''
file: no
string: |
<GetPolicyResponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/">
<GetPolicyResult>
<Policy>
<PermissionsBoundaryUsageCount>0</PermissionsBoundaryUsageCount>
<Path>/</Path>
<UpdateDate>2023-12-01T17:23:47Z</UpdateDate>
<DefaultVersionId>v108</DefaultVersionId>
<PolicyId>ANPAILL3HVNFSB6DCOWYQ</PolicyId>
<IsAttachable>true</IsAttachable>
<PolicyName>ReadOnlyAccess</PolicyName>
<Description>Provides read-only access to AWS services and resources.</Description>
<AttachmentCount>0</AttachmentCount>
<Arn>arn:aws:iam::aws:policy/ReadOnlyAccess</Arn>
<CreateDate>2015-02-06T18:39:48Z</CreateDate>
<Tags/>
</Policy>
</GetPolicyResult>
<ResponseMetadata>
<RequestId>781aa2aa-b3b5-4c07-aacf-4291496c7510</RequestId>
</ResponseMetadata>
</GetPolicyResponse>
recorded_at: 2023-12-06 21:29:12 GMT
recorded_with: vcr/1.2.2, webmockr/0.9.0
Loading

0 comments on commit 6c8bf39

Please sign in to comment.