@@ -56,6 +56,8 @@ def test__secrets_manager_policy_args(generate_policy_args, expected_resource, e
5656 assert set (generated_policy_statement .actions ) == set (expected_actions )
5757
5858
59+ # https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-overview-of-managing-access.html#sqs-resource-and-operations
60+ # https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-basic-examples-of-sqs-policies.html
5961@pytest .mark .parametrize (
6062 "env_base, expected_actions, expected_resource_patterns" ,
6163 [
@@ -66,9 +68,9 @@ def test__secrets_manager_policy_args(generate_policy_args, expected_resource, e
6668 SQS_FULL_ACCESS_ACTIONS ,
6769 # expected_resource_patterns
6870 [
69- r"arn:aws:sqs:\$\{Token\[AWS\.Region\.[\d]+\]\}:\$\{Token\[AWS\.AccountId\.[\d]+\]\}:\*:\* "
71+ r"arn:aws:sqs:\$\{Token\[AWS\.Region\.[\d]+\]\}:\$\{Token\[AWS\.AccountId\.[\d]+\]\}:\*"
7072 ],
71- id = "Test SQS policystatment (env_base=None)" ,
73+ id = "Test SQS policystatement (env_base=None)" ,
7274 ),
7375 pytest .param (
7476 # env_base
@@ -77,9 +79,9 @@ def test__secrets_manager_policy_args(generate_policy_args, expected_resource, e
7779 SQS_FULL_ACCESS_ACTIONS ,
7880 # expected_resource_patterns
7981 [
80- r"arn:aws:sqs:\$\{Token\[AWS\.Region\.[\d]+\]\}:\$\{Token\[AWS\.AccountId\.[\d]+\]\}:\*: dev\*"
82+ r"arn:aws:sqs:\$\{Token\[AWS\.Region\.[\d]+\]\}:\$\{Token\[AWS\.AccountId\.[\d]+\]\}:dev\*"
8183 ],
82- id = "Test SQS policystatment (env_base=dev)" ,
84+ id = "Test SQS policystatement (env_base=dev)" ,
8385 ),
8486 pytest .param (
8587 # env_base
@@ -88,9 +90,9 @@ def test__secrets_manager_policy_args(generate_policy_args, expected_resource, e
8890 SQS_FULL_ACCESS_ACTIONS ,
8991 # expected_resource_patterns
9092 [
91- r"arn:aws:sqs:\$\{Token\[AWS\.Region\.[\d]+\]\}:\$\{Token\[AWS\.AccountId\.[\d]+\]\}:\*: test\*"
93+ r"arn:aws:sqs:\$\{Token\[AWS\.Region\.[\d]+\]\}:\$\{Token\[AWS\.AccountId\.[\d]+\]\}:test\*"
9294 ],
93- id = "Test SQS policystatment (env_base=test)" ,
95+ id = "Test SQS policystatement (env_base=test)" ,
9496 ),
9597 ],
9698)
@@ -104,4 +106,4 @@ def test__sqs_policy_statement(
104106 obt_resource = obt .resources [indx ]
105107 assert re .fullmatch (
106108 expected_pattern , obt_resource
107- ), f"expected_pattern: { expected_pattern } , obt : { obt_resource } "
109+ ), f"expected_pattern: { expected_pattern } , obtained : { obt_resource } "
0 commit comments