add subscription role arn attribute (#5303)

This commit is contained in:
Cristopher Pinzón 2022-07-26 07:57:44 -05:00 committed by GitHub
parent ab045f5beb
commit 98501ae676
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -727,6 +727,7 @@ class SNSBackend(BaseBackend):
"DeliveryPolicy",
"FilterPolicy",
"RedrivePolicy",
"SubscriptionRoleArn",
]:
raise SNSInvalidParameter("AttributeName")

View File

@ -258,6 +258,8 @@ def test_creating_subscription_with_attributes():
}
)
subscription_role_arn = "arn:aws:iam:000000000:role/test-role"
conn.subscribe(
TopicArn=topic_arn,
Protocol="http",
@ -266,6 +268,7 @@ def test_creating_subscription_with_attributes():
"RawMessageDelivery": "true",
"DeliveryPolicy": delivery_policy,
"FilterPolicy": filter_policy,
"SubscriptionRoleArn": subscription_role_arn,
},
)
@ -284,6 +287,7 @@ def test_creating_subscription_with_attributes():
attrs["Attributes"]["RawMessageDelivery"].should.equal("true")
attrs["Attributes"]["DeliveryPolicy"].should.equal(delivery_policy)
attrs["Attributes"]["FilterPolicy"].should.equal(filter_policy)
attrs["Attributes"]["SubscriptionRoleArn"].should.equal(subscription_role_arn)
# Now unsubscribe the subscription
conn.unsubscribe(SubscriptionArn=subscription["SubscriptionArn"])